In the novel his magic wasn't this powerful, Lily just told him that the device to detect magic power was broken and told him he was free to buy any of the magic books in the store, so he bought some beginner spells and when he fired off fireball the first time the girl that has been following him around noted that not only was the fireball bigger than it should have been, but that it also traveled further than it should have (if I remember correctly his fireballs actually travel until they hit something). Also he was smart enough to test his magic outside of town.