What's wrong with my custom reporting plugin?