23. November 2014

WP-ShortStat

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”

wp-shortstat_screenshot.png

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)

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

Comments

  1. @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.

  2. 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

  3. 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.

  4. rushid, thanks for you correction. I’ll update wp-shortstat and upload a new version with this fix.

  5. Love the plugin. However, is there any way to eliminate other ip addresses from the stats?

  6. Big Thanks ! Good plugin.

  7. Bill Bishop says:

    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

  8. 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

  9. This plugin is tested with WordPress 2.3.1, so it should work very well.

  10. 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

  11. 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

  12. 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.

  13. Stian, you are right. Thanks for the fix. I’ve updated to a new version.

  14. 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?

  15. Thank you for this great plugin.
    Using it on my blog from now on.

  16. 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.

  17. 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.

  18. Nordie says:

    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!

  19. 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.

  20. 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.

  21. Version 1.13c is working here with WordPress 2.5 here. If anyone finds a specific problem, please report it to me.

  22. 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~

  23. Damanique says:

    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?

  24. 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.

  25. 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?

  26. 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.

  27. hi. Thanks for plugin

    perfect.

    best regards

    baron

  28. 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 ?

  29. I recently added Shortstat and love the simplicity and elegance. Thanks!

  30. 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

  31. wp-shortstat work with WordPress 2.5.1?

  32. Das ist ein ganz fantastisches Plug-in, welches ich seit einiger Zeit in Benutzung haben.

  33. problem with wordpress 2.6 and wp-shortstat 1.13c

    the page is blank, no results published.

    any idea? thanks.

  34. This site rocks :-) Very nice! Greetings from Spain.

  35. Nice site. I enjoyed it very much! :-)

  36. 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!

  37. Great site, keep up the good work

  38. many thanks for your dedications to this world

  39. 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!!!

  40. Its is not working with wordpres 2.6.2?

  41. @Mani: It works. I’ve tested it with WP 2.6.3

  42. This is one of the best stats plugin so far i have found for wpmu
    it works like a charm and less resource consuming

  43. 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.

  44. 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.

  45. allQoo.com, you may want to search the wpmu forums as wp-shortstat has been discussed many times previously along with fixes.

  46. Herzliche Grüße aus Hannover.
    Gibt es schon Erfahrungen zusammen mit WP 2.7 ?
    Dankeschön.
    Gute Wege durch das neue Jahr.

  47. 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?

  48. 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

  49. 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.

  50. Version 1.14a fixes the Fatal Error on some sites. Thanks to Dave and Thomas.

Trackbacks

  1. [...] Wp-Shortstat:在??显示你 blog 的相关信?。 [...]

  2. [...] WP-ShortStat: Este es una gansada, pero me gusta ver quién está entrando y de dónde ….. [...]

  3. [...] WP-ShortStat Als Google Analytics of andere gratis analytics programma’s je een brug te ver lijken, dan is [...]

  4. [...] Wp-Shortstat (5/48) 是一个访问状?的?件。安装?件之?,到你的管?首页,你就能看到你所需的状?信? 这个?件是由 Jeff Minard 写的,但是目?由 Markus Kaemmerer 维护。 [...]

  5. [...] your blog stats. Based on Stephen Wettone’s SlimStat, Jeff Minards’s plugin, Markus Kammerer’s wp-shortstat rewrite. It can be used upon an existing wp-shortstat database: includes an import tool to upgrade [...]

  6. [...] Wp-Shortstat (5/48) is the stats plugin for your blog. Install the plugin, go to your WP dashboard and you can see the stats you need. The plugin was written by Jeff Minard but now is maintained by Markus Kaemmerer. [...]

  7. [...] WP-ShortStat: estatísticas. Embora utilize o Sitemeter e o Google Analytics, às vezes gosto de olhar este pois ele fica dentro do dashboard e portanto é de fácil acesso. [...]

  8. [...] cerca de 20 megas na base de dados e as estatísticas ocupavam 170. O plugin que eu usava era o WP-ShortStat. Estava bastante satisfeito com ele é verdade mas só até ao dia em que tive problemas com o [...]

  9. [...] wp-shortstat les stats de votre blogue. [...]

  10. [...] Wp-Shortstat:在??显示你 blog 的相关信?。 [...]

  11. [...] WP-ShortStat :内建??统计?件,?以统计?览次数,点击次数,?览器,?览页?,?索引擎,国家,语言等等。原文件我?知?为什么用起?很乱,???到一个写中文的马?西亚朋?修改过的,还?错(?下载该修改过的?此)。 [...]

  12. [...] Track your blog stats. Based on Stephen Wettone’s SlimStat, Jeff Minards’s plugin, Markus Kammerer’s wp-shortstat rewrite. It can be used upon an existing wp-shortstat database: includes an import tool to upgrade [...]

  13. [...] WP Shortstat or GoStats – Want to know from where the visitors to your blog came? WP-shortstat is a traffic tracker for your blog. You can see the traffic stats in your WP dashboard. [...]

  14. [...] WP-ShortStat ?客站点的统计工具,还是蛮准确的,分??访的站点链接和关键字特别有用。 [...]

  15. [...] Tag Warrior Ultimate Tag Warrior: Tag Archive WordPress Database Backup wp-cache WP-CC WP-PageNavi WP-ShortStat WPG2 WPG2 Random Image WPG2 Sidebar Grid [...]

  16. [...] Wp-Shortstat¼br> 25: Nei precedenti del vostro blog che le informazioni relative. [...]

  17. [...] Wp-Shortstat (5/48) is the stats plugin for your blog. Install the plugin, go to your WP dashboard and you can see the stats you need. The plugin was written by Jeff Minard but now is maintained by Markus Kaemmerer. [...]

  18. [...] Wp-Shortstat (5/48) is the stats plugin for your blog. Install the plugin, go to your WP dashboard and you can see the stats you need. The plugin was written by Jeff Minard but now is maintained by Markus Kaemmerer. [...]

  19. [...] Wp-Shortstat:在??显示你 blog 的相关信?。 [...]

  20. [...] kjent fr jeg statistikk over beskende p Nibbler ved hjelp av en ultrafantastiske plugin av Shaun [...]

  21. [...] Wp-Shortstat:在??显示你 blog 的相关信?。 [...]

  22. [...] plugin that shows your websites statistics. The plugin is called wp-shortstat. Take a look here: Here Follow the instructions and then go to Dashboard -> Shortstat. I am a Yahoo widgets user. You can [...]

  23. [...] awstats och webalizer har jag också WP-ShortStat installerat i WordPress, vilket bara visar statistik för de filer som blir hämtade via wordpress [...]

  24. [...] Wp-Shortstat (5/48) 是一个访问状?的?件。安装?件之?,到你的管?首页,你就能看到你所需的状?信? 这个?件是由 Jeff Minard 写的,但是目?由 Markus Kaemmerer 维护。 [...]

  25. [...] WP-ShortStat is a plugin made for regular WordPress to add pretty thurough stats for the blog. Initially this plugin can’t be used out of the box for WPMU, that is you can put it in the regular plugins folder, and let users activate it at their will. [...]

  26. [...] Wp-Shortstat:在??显示你 blog 的相关信?。 [...]

  27. [...] som jeg henter ut med wp-shortstat, viser blant annet følgende [...]

  28. [...] Wp-Shortstat (5/48) is the stats plugin for your blog. Install the plugin, go to your WP dashboard and you can see the stats you need. The plugin was written by Jeff Minard but now is maintained by Markus Kaemmerer. [...]

  29. [...] WP-ShortStat: This is a statistics plug-in. [...]

  30. [...] Statistiques suivies au jour le jour grâce au plugin Shortstat [...]

  31. [...] Wp-Shortstat (5/48) is the stats plugin for your blog. Install the plugin, go to your WP dashboard and you can see the stats you need. The plugin was written by Jeff Minard but now is maintained by Markus Kaemmerer. [...]

  32. [...] Wp-Shortstat (5/48) 是一个访问状态的插件。安装插件之后,到你的管理首页,你就能看到你所需的状态信息 这个插件是由 Jeff Minard 写的,但是目前由 Markus Kaemmerer 维护。 [...]

  33. [...] on plenty of blogs/splogs , but does it work with WordPress 2.5 ? Anyone tested it ? Edit : Developer commenting on WP-ShortStat and WP 2.5 , not yet … Running 2 blogs on WP 2.5 and both have WP-Shortsat running with no problems. [...]

  34. [...] Wp-Shortstat (5/48) 是一个访问状态的插件。安装插件之后,到你的管理首页,你就能看到你所需的状态信息 这个插件是由 Jeff Minard 写的,但是目前由 Markus Kaemmerer 维护。 [...]

  35. [...] your blog stats. Based on Stephen Wettone’s SlimStat, Jeff Minards’s plugin, Markus Kammerer’s wp-shortstat rewrite. It can be used upon an existing wp-shortstat database: includes an import tool to upgrade your [...]

  36. [...] Wp-Shortstat – 在后台显示你 blog 的相关信息。 WP-SlimStat – [...]

  37. [...] Wp-Shortstat:在后台显示你 blog 的相关信息。 [...]

  38. [...] Wp-Shortstat (5/48) is the stats plugin for your blog. Install the plugin, go to your WP dashboard and you can see the stats you need. The plugin was written by Jeff Minard but now is maintained by Markus Kaemmerer. [...]

  39. [...] more features is WordPress.com Stats but on my blogs it didin’t work, don’t know why. ShortStat: WP-ShortStat Happy Arts Blog WordPress.com Stats: WordPress › WordPress.com Stats WordPress Plugins __________________ [...]

  40. [...] how things work sometimes depending on the test data. I use the WP-ShortStats plugin to keep track of the traffic statistics to my blog. And of course, one of the most interesting [...]

  41. [...] Wp-Shortstat (5/48) is the stats plugin for your blog. Install the plugin, go to your WP dashboard and you can see the stats you need. The plugin was written by Jeff Minard but now is maintained by Markus Kaemmerer. [...]

  42. [...] had been causing a MySQL database table to expand so much that I ran out of storage space (users of ShortStat beware!). Thankfully the fix was rather simple, though I felt queasy playing around with codes and [...]

Speak Your Mind

*