Harry Potter would have been good if it had continued as it had started-being a children's fantasy story. After it gained ridiculous amounts of popularity, Rowling tried to cater to all kinds of age groups and was way out of her depth.
The best thing about the books is their initial setting and premise. Beyond that, the quality of writing, execution and the conclusion are really poor.
Despite the glaring flaws, the books still remain entertaining to read but to call them masterpieces of any kind is