Plot hole: The whole premise of the movie is that due to a botched spell, people who happen to know that "Peter Parker is Spider-Man" are pulled inside this universe. It's a bit of a stretch already that amongst those people is...Peter Parker himself, twice over, but let's say it makes sense. The problem is that Jamie Foxx's Electro does not meet this condition; he never found out. You could say it's a retcon or it's a different universe from the original movie's, but even this cop-out explanation is negated by the movie itself when Max Dillon makes a joke that shows that he didn't know Spidey's identity or even race.
Plot hole: Otto Octavius in this movie instantly recognizes the Green Goblin as Norman Osborn, a fact that was never public at least as long as Ock lived. On the other hand, he does not react to Lizard being revealed as Curt Connors, who was a colleague of his in 'his' universe but never a freaky mutated dinosaur like in the 'other' universe.
Continuity mistake: Doc Ock is supposedly from Spider-Man 2 yet here he's gained a sweatshirt or turtleneck whereas in that movie he didn't have one. It's made clear he was pulled from his timeline just before his death, so he should be wearing the same thing.
Plot hole: Sandman's only wish is, as he repeats, to go back and see his daughter again. He helps Spider-man a few times, but at the same time he does not trust him entirely, so he does not act as full time ally. In the final battle though, at one point he explicitly sides with the Sinister Five, making for cool visuals in the battle but no sense; Electro and the others want to destroy the device that will send him home. He has no reasons to support them and every reason to prevent this from happening.
Other mistake: Sandman AKA Flint Marko is the first of the villains to be changed back at the Statue of Liberty fight, and he is told by Peter to stay inside the head to be safe. Seconds later Electro discharges a massive electric surge onto the statue head, which is made of bronze, which is a good electric conductor. Marko should not have survived that. (01:47:40 - 01:48:10)
Plot hole: Strange says he can't turn back time any more since he does not have the Time stone, so he'll resort to "a standard spell of forgetting." The statement is already quite odd since even with the stone he never showed anything close to the ability to revert time on a global scale for the WEEKS it would take to get back to that moment. But no worries; the "standard spell" is in fact more powerful than the Time stone; for it to work, it can't just make the people forget, or else people would learn back about Peter from the gigabytes of pictures and stories published, the Daily Bugle's archives, Flash's published book, T-shirts etc.
Plot hole: The original "Make everyone forget that Spider-man is Peter Parker except..." spell went horribly wrong and Strange at the end of the movie is struggling to prevent a complete collapse of reality because people from the whole multiverse who fit the exception shoehorned by Peter have been drawn to this reality. Strange then does a new spell that supersedes the other by making everyone forget Peter Parker, period. The problem is, by that logic everyone would forget who Peter is also in all those universes involved and so Maguire and Garfield's life are likewise ruined and one wonders if they are even allowed to remember their own name (after all, the initial spell did affect them, so the radical undoing of it should too).
Continuity mistake: In addition to the sweatshirt or turtleneck, Ock's wearing the pair of sunglasses he wore for the bank robbery. Impossible as those were broken by Aunt May. He should've had on the other pair he wore late in the movie.
Continuity mistake: The green lights on the arc-reactor-looking device that Peter uses to extract electricity from Max Dillon (Electro) light up in a counterclockwise direction. Later, in a close-up shot when Norman Osborne (Green Goblin) is speaking, the lights are lighting up in a clockwise direction.