22. July 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. I would like to know if there is a sidebar widget for Shortstat? I like the way the plugin works, but I would like to be able to see the days stats from the sidebar, without having to go to the admin screen.

  2. Thanks for this plugin – I run WordPress.com Stats for stats generally but running this on the side enabled me to get browser & OS stats of visitors, which I just yesterday decided to want too :) I googled for WP plugin to get browser stats and found your plugin mentioned on another blog listing several WP stats plugins at http://www.raven.za.net/blogging/wordpress-stats-plugins/

  3. I get this error under last keywords: Warning: parse_url(http://) [function.parse-url]: Unable to parse URL in /home/ofnature/public_html/wp-content/plugins/wp-shortstat2/wp-shortstat.php on line 671

    However even with this error it still continues to track my visitors. I had the same error under laster referers, but it went away.

    The program is still working GREAT!, I just wanted to let you know about those two little bugs.

    Thanks for the awesome plug-in!!

  4. Alex, you can ignore the parse_url warning or disable E_WARNING in php. Markus

  5. Can you instruct how to correctly disable the e_warning, I’m getting the same error as Alex. thanks!

  6. Use error_reporting(E_ERROR); and ini_set(‘display_errors’, ‘off’); inside the script (from line 75) or disable error reporting in the php.ini file. In the next version of wp-shortstat this will be the standard setting.

  7. Great plugin, works perfect, thanks.

  8. Is there a way to make the Shortstat in another language? I want to put the whole stats in the local language. My PHP skills are minimal and i create translations with the CodeStyling Localization plugin for WordPress. I already made a translation but Shortstat doesn’t use it.

  9. @Sypie: You need the *.po files, translate them to *.mo-files. The *.mo file (e.g. wp-shortstat-de_DE.mo ) must be located in the plugin directory. If you have a new translation, you can send it to me per eMail an I’ll include it in the next release.

  10. Great plugin, but I am now getting errors which did not happen before. In ‘Last Keywords’ this appears: Warning: parse_url(http://lenuw.comConnection: close): Unable to parse url in /home/MyDomainPath/wp-content/plugins/wp-shortstat2/wp-shortstat.php on line 675

    And in ‘Last Referers’ this appears: Warning: parse_url(http://lenuw.comConnection: close): Unable to parse url in /homeMyDomainPath/wp-content/plugins/wp-shortstat2/wp-shortstat.php on line 648

    I also note that the panel shows me ten boxes not eleven (countries is missing). Otherwise this has been a great plugin.

  11. @Markus: this way to put the language file you make a little mess on the server.
    Now it is: /wp-content/plugins/ *.mo file
    it would be better to make it: /wp-content/plugins/wp-shortstat/languages/*.mo file with a selection for the right language in the Plugins section of WordPress.

    Every plugin stays in it’s own folder except ShortStat.

    Send me an e-mail with your address and i can give you the Dutch translation.

  12. Nice plugin, very helpful and easy to use, thanks.

  13. BillyG says:

    Can you show me how to enable ShortStat to send me a list of the search terms people perform on my blog with the data from the “Last Keywords” column?

    I’m sure some PHP guru could whip up some array, echo, list scenario, but it’s over my head.

    Much thanks for anybody that passes that on!

  14. With regards to reducing the size of database:
    Can you introduce an option in admin to delete old data?
    Delete Old data [YES/NO], Delete how many entries = [n], Clear entries every [x] days/seconds.
    Then an automatic scheduled action runs every ‘x’ days/seconds, to delete the oldest ‘n’ number of records from the WP-ShortStat table, wp_ss_stats.
    Any ideas?

    George
    gnetwork.com.au

  15. I love your program, it helps me to gauge reaction to my entries. However, I have two questions:

    1) Do you have documentation that explains each of the pieces of data? E.g., the Hits+RSS.

    2) Assuming the data is still in my database, how do i run a report similar to ‘Last Week’ but for a longer period of time?

    Thanks again,
    Mike

  16. Thanks for the great Plugin shortstat

  17. Mortgage_Master says:

    I installed Wp-SS on a blog that I had built, and it was on there for about six months. I then, recently changed the domain name, but kept the same host.

    Now, the hit counter still works, but I am unable to get the RSS Feed counter to show any activity. This is after re-registering the RSS feed with about five feed sites.

    Can you please help.

  18. still got this error :Warning: parse_url(http://) [function.parse-url]: Unable to parse URL in …………./wp-content/plugins/wp-shortstat/wp-shortstat.php on line 675

    Please help

  19. Great blog you have here but I was wanting to know if you knew of any user discussion forums that cover the same topics talked about in this article? I’d really love to be a part of group where I can get advice from other knowledgeable people that share the same interest. If you have any suggestions, please let me know. Thank you!

  20. Thank you very much for sharing this wordpress plugin. It pretty much helped me exactely with the site I needed it for.

  21. I really appreciate sharing this great post. Keep up your excellent work.

  22. Hi Marcus – quick question…

    I’ve just installed WP Shortstats on a brand new blog – as in an hour or so new – and almost immediately saw 11 uniques in the Last Week Panel.

    Are the uniques a mix of bots and real visitors? I’ve always perhaps mistakenly thought that uniques here meant people?

    :-)

    Thanks

    Alex

  23. I have been using ShortStat for over two years and like it very much.
    But 4 days ago it stopped working. It simply shows 0 visitors. I have not changed anything on our site. Our hosting service (Bluehost) has looked at our logs but saw no errors.
    I would like to know how to get it working again.
    Thank you.
    Bob Gall

  24. Fantastic plugin! I’ve just uploaded it to my blog and it works great and the interface is soooo easy to use!

  25. thank dude ilike that plugin

  26. I do not even know how I ended up here, but I thought this post was good.
    I don’t know who you are but certainly you’re going to a famous blogger
    if you aren’t already ;) Cheers!

  27. Everyone loves what you guys are usually up too. This kind
    of clever work and exposure! Keep up the good works guys I’ve included you guys to my blogroll.

  28. Hi there! This post couldn’t be written any better!
    Reading through this post reminds me of my old room mate!
    He always kept talking about this. I will
    forward this article to him. Fairly certain he will have a good read.
    Many thanks for sharing!

Trackbacks

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

  2. [...] Wp-Shortstat – 在后台显示你 blog 的相关信息。 WP-SlimStat – 提供所有的标准统计数据,而且不会对服务器产生过大的负载。 WP-Stats – 非常全面的统计插件。 [...]

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

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

  5. [...] Reporter – 方便地在后台查看Google Analytics 和 Feedburner统计数据。 Wp-Shortstat – 在后台显示你 blog 的相关信息。 WP-SlimStat – [...]

  6. [...] Wp-Shortstat - 在后台显示你 blog 的相关信息。 WP-SlimStat - 提供所有的标准统计数据,而且不会对服务器产生过大的负载。 WP-Stats - 非常全面的统计插件。 [...]

  7. [...] phpMyAdmin I removed shortstat, slimstat, and counterize II tables from my database which brought it down to a much more [...]

  8. [...] WordPress users enjoy the convenient statistics provided by one of the excellent ShortStat plugins. WP-ShortStat keeps track of many essential types of data: recent referrers, search [...]

  9. [...] a single dialog box. It also displays every image that you have uploaded to your server. 2. WP-ShortStat: This is a good stats plugin that tells me where my visitors are coming from, what keywords they [...]

  10. […] use the wp-shortstat plugin across all my WordPress blogs to track visitors and show me where my visitors are coming […]

  11. […] Wp-Shortstat – 在后台显示你 blog 的相关信息。 WP-SlimStat – 提供所有的标准统计数据,而且不会对服务器产生过大的负载。 WP-Stats – 非常全面的统计插件。 […]

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

Speak Your Mind

*