A few days ago, I decided to give Shaun Inman’s statistics package, ShortStat, a try. A friend of mine had been using it and I really liked the summary type interface. Most stat programs are a compilation of stats for an entire month, but I was more concerned with just getting the most recent amount of data — including cross month information.

So I set forth to install ShortStat. Seemed pretty easy. Edit a config, upload, run install, add an include statement and go! Except I ran intro trouble at the “insert include” statment step.

It seems that, because of the way the ShortStat is set up, the database connection it uses and the one WordPress use tend to get into a hissy fit and then neither program works right. I did eventually find a place to stick the include statement that would work. The base index.php, if you want to know. However, after having gone through that I thought, “Gosh, this would make a great plugin…”

Enter WP-ShortStat

It took a lot of code repurposing to get this stats package to fit into a plugin (including rewriting every database query to use the WordPress database interface) but at the finish line was a singularily awesome plugin.

In short (pun very intended), you just upload-and-activate this plugin and it will automatically initialize itself and start tracking. Bam! Want to see your stats, just jump right to your Dashboard and check out the new submenu, “ShortStat.”

Could that be any easier?

Nope.

Update, Version 1.2: It seems the Admin section detection was faulty on some installs. While I don’t know the specific cause, I’ve reverted the plugin to doing a brute force detection: if the REQUEST_URI contains “wp-admin/” it won’t be counted towards your stats.