Lots of fixes for deprecation/static method warnings

You really should turn WP_DEBUG on so you can see the massive number of warnings your plugin is outputting (one was a deprecation warning from WP3!)

These commits fix all the blatant ones