This is a subject that many of my generation find blasphemous, but I assure you that this post is purely academic. It's a worthy pursuit to identify things that successful authors did poorly in order to avoid them. Let us begin.
The Goblet of Fire Plot Hole
One of the most blaring mistakes of the Harry Potter series is book 4. The entire plot of the book rides on the idea that the Death Eaters have to get Harry to touch any object. That is to say, a portkey can be any object, and Harry just has to touch it outside the walls of Hogwarts. So instead of having a Death Eater come up to Harry at the Three Broomsticks and give him some present, they decide, "Let's make it one of the single most difficult objects to touch in the wizarding world."
Voldemort wants to kill Harry. But first he needs Harry's blood to be able to kill Harry. We need to keep him alive so we (or more specifically I) can kill him. I feel like a whole lot of trouble could be bypassed by just killing him, then resurrecting Voldemort. Maybe that was the Death Eaters' plan. Put Harry in the Triwizard Tournament and let him die accidentally. Or not, they seem pretty fawning. The point is, don't make an entire book based off a plot hole. Examine your characters' motives
before making a plot (and after).
Hm, this picture appears unwilling to show up. It's rejecting my accio
picture command. Another flaw of Harry Potter: I've never gotten any of the spells to work.
Time Travel
A classic way to fill your plot with holes is to introduce time travel. Now, Rowling tried to patch this up in book 5 by sending the time-turners into an infinite loop of getting knocked over, thereby rendering this useless. But that doesn't cover up the fact that they existed for a long time before then.
That means that for every crime committed, the Ministry could just take time turners, go back, and prevent it. Pretty useful, eh? Every single event that they weren't pleased with, they could revert time and change the course of events. For example, the murder of Lilly and James Potter. Why don't we go back and stop Voldemort, or at least warn the Potter's so they can flee? No, no, let's save Buckbeak. (I'm talking more about Dumbledore at this point.) The point is, don't introduce time travel unless you put limitation on it.
Voldemort: The Most Powerful Wizard in the UK
For how infamous and powerful the Dark Lord is, his reach doesn't seem to extend very far past the UK. I don't know that this is a huge flaw, but you'd think that a sociopathic megalomaniac would want to rule more than just one country. One might counter argue that he was still in the process of conquering the UK when he got zapped by Lily's love power. Not a flaw per se, but it just seemed like the villain had a relatively small vision to me.
Another issue with the geography of things is why did the Potter's feel the need to hide in the UK? I'm sure there are hundreds of other wizarding communities (where Voldemort has seemingly no reach) that would willingly hide them. But no, they decide to hide with the bomb instead of away from it.
The Magic System
So then there's the magic system. Rowling just kind of improvises new bells and whistles as she goes along. Then in later books she might completely ignore an element of magic that was so interesting in previous books.
It also seems as if you could just learn Latin and become a master wizard. Why don't they teach Latin at Hogwarts (I mean, they do, but it's broken up). And who decides when you can make new spells? Snape just kind of comes up with a sinister, powerful one as a student. Why hasn't Hermione made a list of her own inventions?
Why do spells have to be generated from the wand? Powerful wizards don't have to use a wand to channel their magic. Why, then, couldn't they originate a spell right in front of someone's face?
Another qualm I had was how Harry only learned like 3 spells his entire 6 years at Hogwarts. I expected him to become a great wizard. In the end, he won off a fluke of wand ownership. Rowling defined dueling magic as the quickest and wittiest wizard will win. But instead of using that definition, she had Harry win because one time he disarmed Malfoy. It was clever, but I didn't feel it was terribly satisfying.
Love Magic (Sacrificial Protection)
Ah, perhaps one of my biggest issues. The love magic. Rowling uses an a priori assumption that love trumps all, but never goes into too much detail. The basic rules of love magic, or sacrificial protection, are die for somebody and they get arcane protection against your killer. So my question is this: why is Harry so revered? Has no one ever sacrificed themselves before? This sounds like a documented phenomenon, yet the entire wizarding world seems oblivious to the fact, naming him The Boy Who Lived. I find it hard to believe that so few wizards have ever sacrificed themselves that the entire community views this as incredible.
And the second part comes when Harry invokes the powers of Sacrificial Protection. He goes to Voldemort who kills him. Then all the good guys back in Hogwarts are protected from his (and somewhat from his cronies') magic. But here's the thing: Harry didn't die. Dumbledore explicitly states this. If he did die then it would be breaking the Rule Against Resurrection when he came back.
But that means that you don't actually have to die in order to access the Love Magic. So another question that gets brought up is are there other acts of love that would activate the Love Magic? I suppose we'll never know.
Other Random Flaws
The Potter universe also seems to completely disregard the existence of modern weaponry. That was likely on purpose, but Harry and Hermione lived with muggles for years before learning about magic. Of course they know about guns, planes, bombs, tanks, etc. Why doesn't Harry keep a glock on him for the next time he meets Voldemort? Imagine the battle in the fourth book: their wands connect. Voldemort is distracted. Harry pulls out a 9mm and pops a cap. It's suddenly a 4-book series.
In the telling of the Deathly Hallows, we learn that one can hide from Death with the invisibility cloak made by Death himself. But somehow a group of teenagers made a map that can see through it. Perhaps Death should have hired the marauders.
Liquid luck, or felix felicis, will purportedly give the user a perfect day. Why didn't Harry and the gang brew some of that up and down it once they came up against Voldemort?
Another thing that was always an issue for me was that when Harry said a phrase that closely resembled Diagon Alley (maybe even how some dialects would pronounce it), he was transported to a place called Knockturn Alley. Diagon, Knockturn. Di, Knock. Is magic so stupid that it can mistake the two?
This isn't exactly a flaw and was touched upon above, but what's the deal with wizards outside of the UK? We see a bit of that in the 4th book with the two visiting schools and the World Cup, but what about continents beside Europe? I understand this topic is briefly discussed in non-series books that I haven't read, but you think there'd be more of a mention. What did wizards of the Plains Indians do in the early second millennium? What about Mayan wizards? Aborigine wizards? African? It's not vital to know, but it would have been nice if the topic were addressed. It could come in a passing comment by Hermione. "We can't reveal ourselves, Ron. The ancient wizards of Mesoamerica did just that and they ended up controlling the people."
In Conclusion
All in all, the books are fantastic. This was merely an exercise to show how even great authors can forget elements they introduce and leave loose ends. They can get caught up in a story and not realize that the plot they're writing is unnecessary. They forget motives. They make a priori assumptions. They ignore facts. They capriciously make and break rules. And we loved it. This is not a ticket to go and do all those things