Harry Potter is a great series, especially so for children/teenagers. I loved the series growing up, it is a great fantasy series. However, it does have some gaping plot holes and some logic that just doesn't hold up (There is no way people living in England, even in a secret magical society, would not know what English money is.) and when compared to some adult fantasy, by the likes of Brandon Sanderson, Patrick Rothfuss, Brent Weeks etc, it's just not as well written.
That said, Harry Potter is not meant to be for adults. The fact adults still enjoy it when it's aimed at children/teenagers, is a point in its favour.