Another thing that can help us maintain credibility is being realistic. And I don't mean the whole "don't make your character have every power of amazingness" issue, but I'm talking about in terms of the timeline and your character's own personal timeline.
As a professor (and I'm really sorry if this comes off as a mini-rant), it bothers me when I see older characters who have trouble with simple spells in my class that they would have learned in their earlier years. Now I know I teach blanket lessons because I don't have time to split the lessons the way the other professors do, but honestly, it's nice to read that characters have an easy time with spells and can perform them flawlessly while all the other characters are flailing about and starting fires.
In the HP universe JKR built, would a 7th year have trouble with Alohomora? Probably not, unless they just really stunk at magic. So why would almost all the 7th years have trouble with Alohomora here? (Just an example).
And in the future, maybe to help combat this, I'll try to come up with more complex things to teach.
But yeah....be realistic in terms of the timeline.