wp-shortstat is a litte statistics plugin for WordPress up to version 3.3.1. The plugin was written by Jeff Minard but the latest original version does not work with WordPress 2.02. I fixed this problem and developed further changes to the plugin. Some changes from other people are also included. To send Patches mail to mk(at)happyarts.de
Download the latest version as zip version.
Installation instructions: copy wp-shortstat.php and your language file *.mo (optional) per ftp to your “your_blog/wp-content/plugins” directory and activate the plugin in the WordPress|Plugins|Plugins-menu. Now you can visit your statistics in WordPress|DashBoard|ShortStat.
Slovene translation from Vid Kosir, Spanish translation from Jaime Gómez Obregón
Update: If you have a large database, you may delete old statistic entries before 2007 with the SQL “SELECT FROM wp_ss_stats WHERE dt < 1167609599″. More about this topic in article “WordPress Tip: Reduce the Size of the WP-ShortStat Database Table”

Version 1.17a (5. October 2011)
- lithuanian translation from professional translator Nata Strazda, http://www.webhostinggeeks.com
- ukrainian translation from professional translator Alyona Lompar, http://webhostingrating.com
- romanian translation from Alexander Ovsov, Web Geek Science http://webhostinggeeks.com
Version 1.16 ( 25. February 2011)
- translatetion to Bulgarian language from Dimitar Atanasov
- encoding fixed (Thx to Alexey Demakov)
Version 1.14c (28. July 2009 )
- disabled more error warnings
- added new russian translation from Fat Cow
- Patch from hacker-piao: fixed possible security vulnerabilities
Version 1.14b (19. February 2009 )
- fixed php warning
- patch from Eric Caron: fixed possible security problem (prevent SQL injections)
Version 1.14a (08. January 2009)
- removed support for wordpress before version 2.3, tested up to version 2.7
- fixed creation of tables at setup
- compatibility fix for WP_MU
- removed deprecated functions
- disabled the country detection, because whois.happyarts.de is not working anymore and there where no more updates to the country panel
- little bit more space for the modules
- language template is now included in standard download file
Version 1.13c (14. April 2008)
- Small changes, maybe improving compatibility with WordPress 2.5
- Corrected handling of hits having no referrers as suggested by Stian
Version 1.13a (14. November 2007)
- fixed Bug with not working Browser and Platform Tabs (Thx to Stian for fixing the bug)
- show percent in Countries tab
- calculate percentage in Browsers and Platforms tab relative to all hits, where these information are known, not to all hits
Version 1.12b (2. October 2007)
- small compatibility fix for WordPress 2.3, tested with WordPress 2.3.1
- we had to switch off the whois.happyarts.net UDP server because of massive server stability problems. We are investigating the problem and may start the service again. Untils this, there is no country code detection possible. Another way to fix this problem would be a local database with ip-ranges and countries. If someone want to write this…
Version 1.12a (8. Januar 2007)
- new database format, about half the size of the old format
- added blogger.com to detected search engines
- fix for broken referer
- added debug version which shows all errors
- some internal fixes (uninitialized variables, …)
- disabled old country detection code
- If you wish to compress your SQL database to about half of the original size, execute these SQL statements once (replace all ‘ with the standard character before)
UPDATE ‘wp_ss_stats’ SET ‘language’ = ” WHERE ‘language’ = ‘empty’
UPDATE ‘wp_ss_stats’ SET ‘browser’ = ” WHERE ‘browser’ = ‘Indeterminable’
UPDATE ‘wp_ss_stats’ SET ‘version’ = ” WHERE ‘version’ = ‘Indeterminable’
UPDATE ‘wp_ss_stats’ SET ‘platform’ = ” WHERE ‘platform’ = ‘Indeterminable’
ALTER TABLE ‘wp_ss_stats’ CHANGE ‘country’ ‘country’ CHAR( 2 ) NOT NULL
ALTER TABLE ‘wp_ss_stats’ DROP ‘user_agent’
Whois PHP service switched off (13. December 2006)
Now it is 6 months ago that we wrote and launched the UDP-based whois service on our server to process the whois queries in wp-shortstat. The new service replaces the old PHP based ip2country.php script which should not be used anymore. Please download the latest version of wp-shortstat to use the UDP service because the PHP based is switched off now.
Version 1.11 (27. June 2006)
- fixed lost referer for some strange php configurations
Version 1.10 (22. May 2006)
- More timeout handling for UDP connect/usage
- If UDP connect to http://whois.happyarts.net fails, use old TCP algorithm
- Show feed hits separatly
Version 1.9b (11. May 2006)
- We added a new country detection service, using our own server written only for wp-shortstat (using c# with mono) and UDP, instead of HTTP with php/apache/mysql as server. We hope, that we can rise the limit of 5 queries/second to at least 50 queries/second. This should also improve the performance of your weblog. Please donate to allow us to improve this service.
- search termes with special characters (all chars not included in US-ASCII) where not handled correctly
- more charset problems fixed, we use html entities instead of unicode for output now
- added new module: “Last Keywords”, shows the last couple of search keywords extracted from the referrers
- Improved CSS a little bit
Version 1.8 (23. April 2006)
- added PHP 5 compatibility
- added more search engine strings
Version 1.7h (06. April 2006)
- Localized date strings
- Search terms are now converted to blog charset
- Fixed more date/time offset problems. Incorrect timestamps where written to the database if server time and wordpress time are differ (thx to John Holman and James Skemp)
- Added detection to more newer browsers like Safari 2.0.2-2.0.3 and others (thx to Sean Park)
- Stripp PHP-SessionID from referrer string
- Added three russion search engines (from http://register.intruder.ru)
- Test if function mb_convert_encoding exists, because not all PHP installations have this function
- Don’t foget to adjust your daylight saving time (+1) in Admin|Options|General
Version 1.6 (27. Feb. 2006)
- Use more localized date/time format strings
- New module Last Resources and Localized version with Italian language file, done by Due Chiacchiere
- Reordered some modules
- French translation by http://www.ikiru.ch/blog/2006/wp-shortstat-traduit-en-francais
Version 1.5a (17. Feb. 2006)
- We from Happy Arts added a new server service: whois.happyarts.net. This service determinates the country from an IP address, using a 300 MB MySQL database from http://www.hostip.info. We could not use hostip, it is to slow and whois.wordpress.de doesn’t work anymore. This fixes the problem that the languages are “Indeterminable”.
- Fixed some quote marks in incorrect charsets (thx to David), fixed title for links in the two referrers boxes
Version 1.4a
- for performance reasons show only the last 7 days of hits statistics
- speedup for weekly statistic (nearly doubled the performance)
- fixed time difference in weekly statistics
older changes:
- new host for detecting country code (thx to wordpress.de)
- fixed time offset calculation in wp_shortstat_display_stats, TodayHits and UniqueHits, now uses time zone configured in WordPress
- search terms are now saved case insensitive
- do not check for “is_admin_page” function anymore, because some plugins like Google Sitemap Plugin from Arne Brachhold include this function an wp-shortstat thinks that we are admin, even on standard pages
- fixes from http://www.4null4.de/63/wp-shortstat-korrekturen included
- do not check for “is_admin_page” function anymore, because some plugins like Google Sitemap Plugin from Arne Brachhold include this function an wp-shortstat thinks that we are admin, even on standard pages
- multiple fixes for detecting pages that should not been counted
- page calls from users that are logged in and are admins don’t counted anymore
- changes from WebKeyDesign included: changed CSS to match WP2 theme (http://www.webkeydesign.com/107/wordpress-20-shortstat-plugin/)
- naver.com search term recognition added
- fixed all reported warnings from Zend Code Analyzer

@Budi: There’s a list of differences between SlimStat and ShortStat at http://wettone.com/code/slimstat#difference – basically, SlimStat has more ways to filter/slice the data.
Hallo,
leider musste ich ShortStat bei einem Blog deaktiveren, da es beim IE7 für Fehler sorgte. Siehe http://forum.wordpress-deutschland.org/allgemeines/24250-aufruf-fehler-mit-internet-explorer-7-a.html
Just a small correction.
There is a test of mb_convert_encoding at line 691, if it exists it uses it. But sometimes is buggy mb_convert_encoding function unable to detect correct incoming encoding, which will result as a php warning message in your stats. Easiest way is ignore this message and let it go.
Line 692: ‘@mb_convert_encoding’ instead of ‘mb_convert_encoding’
Thanks for your work, it’s really nice small WP plugin.
rushid, thanks for you correction. I’ll update wp-shortstat and upload a new version with this fix.
Love the plugin. However, is there any way to eliminate other ip addresses from the stats?
Big Thanks ! Good plugin.
This code to look up the country no longer works:
No longer seems to work (returns blank) — is whois.happyarts.net down???
Thank you!
Bill Bishop
Does this plugin work with WordPress 2.3.x? I installed the plugin and it doesn’t seem to work. I might not be that much of a techie, but I’m pretty sure I got everything installed correctly. I really like this plugin by the way.
Chrissy
http://www.mommadiary.com
This plugin is tested with WordPress 2.3.1, so it should work very well.
Greetings, nice work with this plugin. The Browsers, Platforms and Contries columns of the databasetable aren’t filling up as they should. As I understand it you have cut access to the whois for countrycodes, but does that explain browsers and platforms?
Best regards,
Stian
Just a small update, I get the following error when using the debug version:
Notice: Undefined variable: ua in /path/to/wp-content/plugins/wp-shortstat.php on line 112
Another update
On line 112 I changed $ua to $_SERVER['HTTP_USER_AGENT'] and it seems to start filling up the tables, at least for platforms.
Stian, you are right. Thanks for the fix. I’ve updated to a new version.
Markus: I might be interested in doing some coding so that the ip2contry stuff can get working. Do you have any suggestions on where I can get info on IP ranges and their respective countries and so on?
Thank you for this great plugin.
Using it on my blog from now on.
Hi,
great plugin, it’s nice and direct in giving information about statistics.
But if I access WP from an Ubuntu via Firefox it doesn’t register any other browser does on the same system. Tested from multiple systems. Firefox on Ubuntu doesn’t even make a database entry.
Greetings. For some reason a few weeks ago the stats started breaking, this turned out to be the result of some hits having no referrers were beeing treated as though they had. And they were then sent through parse_url returning an error (since there was no url, and http:/// had been sent/defaulted instead).
As a quick fix for this I added an if statement in getReferers and getLastKeywords, where if $r->referer != “http:///” it ran parse_url, and else $url = “”.
Don’t know why this started occuring, and I would like to note that I am running a slightly adapted wp-shortstat to work with mu (se http://development.sier.no for info), but I can’t see that any of my changes should be the cause for this error.
Hello Markus,
I love this plugin, but notice that it does not display all statistics under WordPress 2.5.
Any chance that you will upgrade the plugin for 2.5?
Thank you!
I have no wordpress 2.5 installation at the moment, but I’ll test wp-shortstat with 2.5 in the next view weeks and will do any changes to get it working. If anyone know specific problems, please write an mail.
I’m running wordpress 2.5 currently, and I have installed the wp-shortstat plugin and it’s not displaying any statistics at all, even though I know the site has been hit upon.
thanks for your help.
Version 1.13c is working here with WordPress 2.5 here. If anyone finds a specific problem, please report it to me.
Hello Markus,
I didn’t see a 1.13c listed in this post. Can I use the same download link above?
GREAT plugin, by the way!
Suggestion – add a section that lists and shows when the Search Engine bots come to visit.
Thanks!
N~
I have updated wp-shortstat to the latest version, but I am still not getting any data on the Countries tab (it simply states ‘please update wp-shortstat’). This has been the case since October 2007 and I’ve not been able to fix this. Is there a known solution to this problem?
Damanique, the Countries tab is not working, because we have to shut down because of stability problems and heavy traffic (see version 1.12b above). The message “please update wp-shortstat” will not disapear again, until you truncate the database.
Ich habe seit heute unter “last keywords” die Meldung:
Warning: parse_url(http:///) [function.parse-url]: Unable to parse url in /www/htdocs/…/wp-content/plugins/wp-shortstat/wp-shortstat.php on line 688
Habe unter phpMyAdmin die Datenbank optimiert und repariert, aber der Fehler bleibt. Dito von 1.13a auf 1.13c aktualisiert. Ebenfalls ohne Änderung. Wie könnte ich es lösen?
Okay, wie ich oben dann doch gefunden habe, handelt es sich nur um eine Warnung, die man ignorieren kann. Hmm, aber es sind fünf Fehler direkt hintereinander und meine letzten Testaufrufe via Google werden bislang nicht unter den Keywords angezeigt. Okay, mal abwarten.
hi. Thanks for plugin
perfect.
best regards
baron
Hello,
I have one small issue with wpmu. Once I’ve activated it, the link to my dashboard is :
wp-admin/index.php?page=index.php
Which leads me to a blank page … Any idea how to fix this ?
I recently added Shortstat and love the simplicity and elegance. Thanks!
I’ve really enjoyed your plugin and thought I would return the favor some by offering the new aesthetic touches I put on the plugin. I’ve tried to incorporate quite a bit of what Shaun Inman has done in Mint so the overall look is effectively Minty. I’ve tested it in IE7 and Firefox 2/3 let me know if you’re interested.
Thanks
wp-shortstat work with WordPress 2.5.1?
Das ist ein ganz fantastisches Plug-in, welches ich seit einiger Zeit in Benutzung haben.
problem with wordpress 2.6 and wp-shortstat 1.13c
the page is blank, no results published.
any idea? thanks.
This site rocks
Very nice! Greetings from Spain.
Nice site. I enjoyed it very much!
This is my first time visiting this site and I found it very informational as a whole. I am so delighted in finding your website!
Great site, keep up the good work
many thanks for your dedications to this world
hi markus,
super plugin, zig-fach erfolgreich installiert – und jetzt taucht doch ein problem auf: installation funktioniert ohne fehlermeldung, die tabbelen auf der plugin-seite sind leer! habe in php-my-admin nachgesehen: die tabellen ss_stats wurden nicht angelegt. habs jetzt ein paar mal wiederholt, nix tut sich. eine idee???
DANKE!!!
Its is not working with wordpres 2.6.2?
@Mani: It works. I’ve tested it with WP 2.6.3
This is one of the best stats plugin so far i have found for wpmu
it works like a charm and less resource consuming
I’ve been in search of something like this ever since my statpress plugin self-distructed. I’ll give it a go and see if it works. Thanks.
I am needing it for my wpmu as well. Activated but the grid on dashboard is not showing up neatly.. counter shows nil for now… wondering if there need/is any setting.
allQoo.com, you may want to search the wpmu forums as wp-shortstat has been discussed many times previously along with fixes.
Herzliche Grüße aus Hannover.
Gibt es schon Erfahrungen zusammen mit WP 2.7 ?
Dankeschön.
Gute Wege durch das neue Jahr.
I see everything from “Last Week” to “Platforms” . After “Platforms”, there is only the “Countries” title bar with no window or data, and then the “Languages” widnow with data . So some windows/data are not here. Also, how can I make the windows larger?
Upgrade Plugin
Downloading update from http://downloads.wordpress.org/plugin/wp-shortstat2.zip
Unpacking the update
Deactivating the plugin
Removing the old version of the plugin
Installing the latest version
Plugin upgraded successfully
Attempting reactivation of the plugin
Plugin failed to reactivate due to a fatal error.
Fatal error: Cannot redeclare wp_shortstat_display_stats() (previously declared in /var/www/vhosts/mysite.com/httpdocs/wp-content/plugins/wp-shortstat2/wp-shortstat.php:954) in /var/www/vhosts/mysite.com/httpdocs/wp-content/plugins/wp-shortstat2/wp-shortstat.php on line 1009
I get a fatal error when I activate the latest version:
Fatal error: Cannot redeclare wp_shortstat_display_stats() (previously declared in /home/golddave/public_html/nothing/wp-content/plugins/wp-shortstat.php:954) in /home/golddave/public_html/nothing/wp-content/plugins/wp-shortstat.php on line 1009
Please help.
Version 1.14a fixes the Fatal Error on some sites. Thanks to Dave and Thomas.