In an effort to counter the Autobot spin, we recount the film and present an unbiased view of events. Be warned: spoilers and logic after the jump.
TDotM opens with an extended trailer for the Transformers: War for Cybertron video game. In the last days of the war, Autobot leader Sentinel Prime invented "the Pillars", technology that would end the war once and for all but his ship, the Ark, is shot down by Decepticons. It crashes on the dark side of the moon, which is apparently right next to Cybertron, sparking the 1960's space race.
Sixty years later, the Autobots are working with the American military to protect humanity from itself, which here means murdering the Middle Eastern parts of it. When we first see the Autobots, they're infiltrating an Arabian military checkpoint disguised as a diplomatic convoy. The moment they pass the gates, they transform and begin heroically killing the unsuspecting guards, thereby totally and utterly negating the point of being in disguise in the first place.
Megatron and the remaining Decepticons are cleverly hiding from the Autobots in the one place nobody would ever think to look for a giant robot that can disguise itself as whatever vehicle or mechanical object it wants: right out in the open in the middle of the African Savannah, where there are, you know, no vehicles or giant robots whatsoever.
Back home, Sam Witwicky (Shia LaBeouf) is ANGRY! because he can't get a job, despite having saved the world twice already before. We know this because pretty much the entire first hour of the film is devoted to everyone in the entire movie talking exclusively about how Sam can't get a job.
As with most unemployed people, Sam's life is TERRIBLE. He is forced to live in a well-appointed two storey loft with his new ridiculously hot, nice, driven, (apparently) intelligent supermodel girlfriend Carly Banks (Rosie Huntington-Whitely). WORSE, the Autobots are too busy to even talk to poor old Sam anymore. Except for the two comedy relief bots who live with him for no reason. Even WORSER, Carly works for McDreamy (Patrick Dempsey), a (clearly evil) charming billionaire playboy accountant, which is apparently a thing.
Possibly because they've killed everyone in the Middle East, the Autobots travel to Chernobyl, Russia, where they discover a fuel cell from the Ark. Then Shockwave, a Decepticon with a giant robotic Dune sandworm penis, attacks them with said appendage, because hey, if you've got it, flaunt it.
Surviving the close encounter of the penis kind, Optimus returns to the USA OptiPISSED, because the US Government has been hiding knowledge of the Ark the whole time. He very maturely does an "I can't hear you" routine with No-Nonsense CIA Boss Lady (Frances McDormand) before eventually going to the moon anyway, recovering Sentinel Prime and the five remaining pillars.
Oh, FYI the pillars form a "space bridge" that can instantaneously teleport things like large amounts of Decepticons or, say, planets, from one end of the galaxy to the other. Remarkably, it can even transport plot points directly from other iconic science fiction franchises, as this is literally EXACTLY THE SAME evil plan the Time Lords had in Doctor Who's The End of Time.
Meanwhile, Sam has found a job in the mail room of Some Company Inc., run by John Malkovich playing Charlie Sheen on the drug Charlie Sheen playing John Malkovich in Being John Malkovich. Decepticon whistleblower Community's Señor Chang turns up and drags Sam into a bathroom stall to tell him Chang knows THINGS about the Decepticon master plan, WHICH IS FUNNY BECAUSE JOHN MALKOVICH THINKS THEY HAD GAY SEX! CLASSIC!
At this point, presumably because he is incredibly bored of waiting for the action to begin, Laserbeak (literally the only Transformer in the movie smart enough to remember he is a transforming robot who can transform himself into different things, like a photocopier [hey, nobody said they were GOOD things]) gives up on the whole secret plan thing and tries to kill Sam, as well as pretty much everyone in Sam's office.
Before Sam (now joined by John Turturro and Alan Tudyk doing a funny accent because apparently Michael Bay thinks that an accent and characterisation are the same thing) can warn the Autobots , Sentinel Prime turns to the Dark Side, kills Ironhide and activates the pillars, using them to teleport all of the Decepticons to Earth who've been hiding on the moon for the last 60 years waiting for their cunning and incredibly drawn out plan to come together.
And no, if this really was the Decepticons plan all along, they couldn't have saved a lot of time and done it in either of the first two movies because shut up.
The Decepticons quickly and efficiently take over Chicago, make a huge number of gargantuan gunships and assorted other Decepticons appear out of nowhere, get McDreamy to kidnap Carly and have the Autobots exiled into space via rocket ship, which, in a move everyone saw coming, they promptly blow up. OH NO, the Autobots are dead! Sentinel Prime fires up the pillars again, this time planning to bring
The US military can't even get close because their planes get blown up the second they approach the city, which leads Lt. Colonel William Lennox (Josh Duhamel) to come up with what might literally be the most insanely stupid plan in the history of everything: enter the city using WINGSUITS! Which are TOTALLY COOL. And are also, you know, nowhere near as fast, heavily armoured, or armed as any of the planes the Decepticons just blew up.
Sam decides to make his own way into the city to rescue Carly with the help of his new friends, a bunch of plucky (but actually surprisingly cowardly) ex-soldiers who all apparently chose to be paid in heavy artillery instead of money when they left the army.
Sam & Co are about to be put out of everyone's misery by a Decepticon when SHOCK TWIST! Optimus and the Autobots return. Optimus explains that it was their plan all along to pretend to leave Earth, so that the people of Earth understood that Decepticons could not be trusted. Meaning, and this cannot be stated emphatically enough, the NOBLE LEADER OF THE AUTOBOTS LEFT EVERYONE IN CHICAGO TO DIE IN ORDER TO TEACH EARTH A LESSON.
This commences the one hour (literally) action sequence portion of the film, during which: Sam totally blows the Autobots' chance of a surprise attack by selfishly rescuing Carly; Sam and Carly get trapped for 20 minutes in a skyscraper while Shockwave molests it with his giant robot penis; Optimus transforms into Flying Optimus™only to get tangled in ropes. For at least 15 minutes. Which he needs the Wreckers to help him get out of. Despite the fact that he: a) is a ridiculously strong giant robot; b) is made of at least 4,907 incredibly sharp pieces of metal; and, c) CAN TRANSFORM INTO AND/OR CARRIES A WIDE VARIETY OF EDGED AND PROJECTILE WEAPONRY.
Ultimately, the pillars are destroyed and Cybertron is sucked back into the vortex from whence it came but that still leaves Optimus to get his ass horribly kicked by Sentinel Prime, losing an arm in the process. That is, until Megatron is convinced by Carly (who has never met, seen, or assumedly even heard of Megatron prior to the moment she sees him, but somehow manages to completely understand his nature and skillfully manipulate him anyhow) to help kill Sentinel.
Megatron saves Optimus' life, basically defeats Sentinel on his own AND then offers Optimus a truce. Optimus repays all of this incredible kindness by doing exactly what you'd expect the heroic, noble and wise protagonist to do: he rips out Megatron's head and spine. Sentinel is crawling away when Optimus catches up to him and, despite pleading for his life, executes the elder Transformer, shooting him in the head point blank with a shotgun, execution style.
So, just to recap, the movie ends with Optimus Prime BRUTALLY MURDERING TWO TRANSFORMERS IN COLD BLOOD.
You should see this movie if: you enjoyed Transformers 2, like giant robots, explosions and one hour action sequences.
You should not see this movie if: you are in any way a fan of logic, character development, or CGI-light films.