mark.watero.us

Wordpress stuff, a statistics plugin, and jello

kStats Reloaded

55 comments

Description

kStats Reloaded began as a project to redesign StatPress Reloaded into a much faster and more up to date statistics plugin for Wordpress. The original StatPress Reloaded is an amazing plugin, and can be found here.

Since it’s inception, while running through its lengthy and sometimes tumultous beta process, kStats has evolved quite considerably. This is thanks in part to the response it has received from the many helpful and informative people who are now using it.

Using kStats you can instantly see who’s coming to your site, where they are coming from, be it another web site or one of the many popular search engines, and much more. See up to the minute information on how many unique visitors you’ve gotten, how many pageviews they’ve resulted in, including information on which crawlers are visiting and indexing your Wordpress site.

With the information provided by kStats Reloaded, you can easily and quickly determine what marketing strategies are already working for you, what search terms are producing the best results, and continue to develop future strategies with confidence.

kStats is much faster than many of its predecessors due to the fact that it takes a completely new approach to how it stores and maintains information. Using a slightly more complex database schema and running a daily aggregate of information allows it to reduce its SQL interaction by literally hundreds of queries.

This plugin is currently in its initial beta release — it is meant for beta testing only, and not intended for use on a live web site. Use at your own risk. With that said, it should not crash your site or cause any issues with other plugins, however there is a very high chance you will find something that doesn’t work as expected. If and when such things are found, please report them.

Installation

  1. After unpacking the archive, upload the entire /kstats-reloaded/ folder to your /wp-content/plugins/ directory
  2. All of the .ini files in the packages /definitions/ folder need to be made writable (chmod 0777)
  3. Navigate to the Plugins page of your Wordpress Dashboard and activate kStats-Reloaded
  4. Watch the statistics start building immediately!

** Please note that installation of kStats Reloaded requires PHP 5. MySQL 5.0.3+ is recommended but not required.

Written by mark

October 30th, 2009 at 12:56 am

Posted in Uncategorized

55 Responses to 'kStats Reloaded'

Subscribe to comments with RSS

  1. Could not activate your plugin. Got the following error msg.

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /homepages/28/d290341024/htdocs/wp-content/plugins/kstats-reloaded/lib/datetime.php on line 24

    Any ideas?

    Jim Arber

    31 Oct 09 at 888:01 am

  2. Hey Jim, that’s due to fact that I built an internal date time class for kStats to standardize the way it records and displays timestamps across the plugin; except that I wrote it using PHP 5’s OOP syntax.

    Given a recent conversation on the wp-hackers list, and the fact that PHP 6 is right around the corner, support for PHP 4 is hard to rationalize. Most hosts will have it available, but for some reason some of them require that you specifically request it – you may want to contact them about it.

    I’ll look at adding a check for this that will notify the end user, instead of leaving them with that cryptic error.

    mark

    31 Oct 09 at 121212:16 pm

  3. Fatal error: Call to undefined function kstats_get_lastmonth_day() in /wvagc.org.uk/wpwvagc/wp-content/plugins/kstats-reloaded/lib/datetime.php on line 84

    We got this error today 1/11/2009 how do we solve this please.

    Kevin Collins

    1 Nov 09 at 111:16 am

  4. See the following comment;
    http://mark.watero.us/2009/10/kstats-initial-bug-reports/#comment-324

    I also responded to your bug report via email.

    mark

    1 Nov 09 at 111:53 am

  5. Hi there,

    Great plugin… Unfortunatelly I guess is not running well on wordpress 2.8.5. I have installed it, worked perfectly for almost 24 hours, then when the day passed and the next day started my blog was blank. No page was loading. I tried everything but in vain. In the end I deactivated the plugin by entering with phpmyadmin directly to my database and everything went back to normal… Any ideea why this is happening?

    Thanks,
    Bogdan

    bampi

    1 Nov 09 at 222:37 am

  6. Crashed my two websites few days ago. I’m not installing this again unless others say it’s stable. I’m not very good at using my cPanel, imagine my panic when my sites both crashed overnight.

    Jojo Agot

    3 Nov 09 at 666:47 am

  7. Hi there,

    You seem to have some bugs in your kstats… I updated it from the initial version to the version for a few days ago and I lost all the trafic information for the past 4 days… It started from the scratch… You should try to fix that… Otherwise it looks great your plugin…

    bampi

    5 Nov 09 at 999:29 am

  8. We’re running this on WPMU and testing it on theswankcity.com without a problem. We’re using the latest build of WPMU and a few other plugins (including WP Super Cache). I expect that we’ll start moving it to our other properties as development continues, but for now we’ll just be in testing mode on the one site.

    Great plugin!

    Editor

    6 Nov 09 at 444:41 pm

  9. @jojo,
    That’s a risk I attempted to warn people about on the page above, though I guess in this case it did crash a few sites despite me saying that it shouldn’t!

    I hope I haven’t lost your interest in it for the future, and while the latest release has proven very stable, I’m still going to be adding features for the next little while that could have unexpected results until fully tested; version 1.0.0 when it comes out will be your best bet.

    @bampi,
    There’s definitely some bugs, and the upgrade process isn’t immune. I’ve been working on this as much as the application itself to make sure that moving from one version to the next won’t affect any of the data, but I’ve got a few reports of 0.2.5 -> 0.4.1 not upgrading everything (half the upgrade seems to happen, then the other half is skipped). I may be releasing a patch for this shortly, depending on how long it looks like it’s going to be before the next release comes out.

    @Editor,
    I originally started development of this plugin for a WPMU site, and decided to release it as a standalone plugin in order to get feedback on it as I went. I still have plans to port it back onto an MU site that’s under development right now, and may release a version sometime down the road that is specifically designed for MU, so keep an eye out! :)

    mark

    6 Nov 09 at 555:12 pm

  10. Mark, thanks for the follow-up. I sent you an @ on twitter, but I might as well post it here as well.

    Is there any way to exclude IP’s or a specific browser from registering hits on the stat counter?

    Editor

    6 Nov 09 at 666:26 pm

  11. @Editor,
    I’m horrible with Twitter, some weeks I’m on top of it regularly, other weeks I forget I even have one.

    Right now the only way is through direct editing of the ignore.dat file in your /kstats-reloaded/definitions/ directory. Each IP to a line, and you can omit the last block if you want to ban an entire range. As for browsers, no, not at this time. I am planning on adding this feature in the next release along with a more streamlined db structure (3 tables instead of 6, which will also allow for configuration of the top 20 lists)… perhaps what I’ll do is add the ability to filter results by ip|referrer|browser|page viewed, and a few others, and then let the user define a list of criteria to check each of these against.

    mark

    6 Nov 09 at 777:08 pm

  12. Absolutely awesome stats program, finally someone that knows how to make one lean and mean.

    The flags are not showing up in our main kStats page, it starts to try to load them, then just goes white where they would have been. Anyone know how to fix that?

    Christian

    7 Nov 09 at 121212:17 pm

  13. Hi Christian, they used to work in version 0.4.0 but now they are not working. No clue how to make them appear

    bampi

    7 Nov 09 at 121212:58 pm

  14. @Christian,
    Thank you for the comments, I’m glad to hear that there’s some interest in the direction this plugin is taking.

    The biggest goal behind this project is to run stats in real time as fast as possible, and to that end I integrated a few features that rely on community project APIs, all to refrain from reinventing the wheel where possible. The flags are generated and displayed by hostip.info, which appears to have gone down in the last couple of days.

    I can’t reach any of their sites right now, or the api, so we might have to wait until it comes back up and I get in touch with the administrators over there to see what happened. I had plans to integrate user agent detection from user-agent-string.info in such a way with the next release, but these are the things that make it difficult to decide the best course of action.

    If it comes down to the fact that they’re community projects and they’re hosting is sub-par, I’d be interested in providing for them – if it’s something else, I may have to look into alternate solutions to make sure kStats isn’t affected.

    mark

    7 Nov 09 at 333:46 pm

  15. Christian you should check now, the flags are working cuz the hostip.info website is up and running

    bampi

    8 Nov 09 at 222:28 am

  16. Hi Mark,

    Starting with version 0.4.2 everytime I loose the yesterday stats. I am running wordpress 2.8.5 and I never encountered this problem when I was running your kstats version 0.4.0. So I think something might be wrong in your plugin cause every time it starts a new day I am loosing the stats form the previous day

    bampi

    8 Nov 09 at 111:55 pm

  17. Hi Mark. I have yet to really test your plugin, but would love to help debug things in any way I can. At the moment I am using the original StatPress on quite a few of my blogs, some of which have been around for years now. One site in particular is now totally bogged down because of the stats. The problem is, the client wants to keep yearly stats. So, my wp-statpress table is at a whopping 83mb. I fear if I try to do any sort of conversion, I’ll likely lose my data and trying to backup such a large file is unlikely at my skill level. Is there any sort of manual data conversion I can do? Also, if I try to convert, does the wp-statpress table have to be deleted or can it stay in tact just in case? These may be n00b questions, but I just want to better understand before I make such a huge leap. I do have several more personal blogs I can install your plugin on to help with the testing process… some that also have StatPress on them currently, but not so large.

    Thank you for a great plugin and your time.

    Rene

    10 Nov 09 at 111:48 am

  18. The way kStats is built maintaining your old data is a lot more robust than the way StatPress kept it – there’s a totals table which maintains the data on a daily and monthly basis, reducing each one to a single row instead of the hundreds to thousands that StatPress did. The aggregate tables maintain all data accumulated since day one, but once again in such a way as to reduce the load on your server and database greatly while still maintaining accuracy.

    I’ve tested the converter on StatPress tables holding a few megabytes of information, but not so high as 83 as of yet. What I’d like to do here is email you, so that we can attempt this in my own sandbox environment and make sure it will work before attempting it on the live site – that way I can walk you through any part of the process that requires it, and hopefully get you up to speed as soon as possible!

    Edit (please read if you’re converting from StatPress – I forgot to mention, and it does allude to this on the administration page, but it bears repeating; any conversion attempt WILL alter the original StatPress Table.

    It is highly recommended that a backup of the database be made, and more importantly that you do the conversion on a copy of the table and not the original table itself. If you have phpMyAdmin, this is as easy as selecting your StatPress table from the list of tables on the left (usually wp_statpress), clicking on the “Operations” tab at the top of the screen, and then filling in a new table name under ‘Copy table to’ (ie, wp_statpress_old). Remember to check the option that says ‘Structure and Data’ to copy all the rows over as well.

    I should update the process to do this automatically, but it was originally done as a personal feature for myself, and only became fully integrated with the last version (0.4.2)…

    mark

    10 Nov 09 at 111111:48 am

  19. upgraded to 0.4.7 and i get the message ‘Plugin could not be activated because it triggered a fatal error.’

    using wordpress 2.8.5

    0.4.6 worked fine :(

    L.E.MCLENNAN

    14 Nov 09 at 999:00 am

  20. 0.4.6 shouldn’t have worked at all, it had three files from 0.4.3 in the tagged release, due to my sleep deprivation at the time of trying to update it – thus 0.4.7.

    I’ve just attempted a clean activation of 0.4.7 with no problem, and I even tried reinstalling 0.4.2 and upgrading directly with no problems – what is the fatal error you’re receiving?

    mark

    14 Nov 09 at 111111:50 am

  21. Mark,

    I’ve been running kStats for a while now on one of my sandbox domains. I run StatPress Reloaded on all of my production sites, but development of the plugin has slowed down or stopped, so I’m looking for a replacement. Looks like you are doing a fine job. When I upgraded to 0.50 earlier, it seems like it lost all of the previous data. Thoughts on why that might be? Or is it just not displaying the data?

    Scott Hack

    16 Nov 09 at 111:20 pm

  22. Hi Mark,
    Since Statpress is very slow due to the terrible datamodel I was looking for a better solution and came here.
    After installation I noticed that there are no records in the tables.
    I installed it on both wp 2.8.5. and 2.8.6. but neither version works for me. I can’t find errors in the apache logs, so I don’t know here to look.
    I read MySQL documentation and noticed that (tiny)text columns do not use indexes, sorts are done on disk (filesort). These are huge performance killers.
    Is it wise to use varchars instead of tinytext?

    Rene Zijlstra

    17 Nov 09 at 888:26 am

  23. Ever since I began development of this plugin, I’ve seriously started to wonder how those other people do it without ever having all these problems! If nothing else, I have definitely gained all new respect for each and every one of them. :)

    @Scott,
    My apologies, I was out of the office yesterday and never had a chance to get back to you in a timely fashion. Are you able to check your database tables and see if it’s still recording in the wp_kstats_raw table? I’m going to fire off an email in your direction so we can try and figure that out if you’re up for it.

    @Rene,
    Your issue sounds like it may be linked to the same one that Scott is experiencing with 0.5.0 – I’ll start trying to debug by doing a clean install on my blog here and on my sandbox server (running wpmu 2.8.5.2 and wp 2.8.5 respectively).

    As for the tinytext columns, I have that on my todo list of things that need to be changed – a lot of the structure in the raw table (and subsequently in the new charts table) is remnants of StatPress. My first order of business was to rip out the sheer amount of SQL queries StatPress was using; I managed to reduce this by quite literally almost a couple hundred extraneous queries. Task number two at present is working on the codebase itself, and task number three which is coming up before we reach a version 1.0 release is optimizing the tables themselves.

    Honestly part of the reason I’ve delayed doing this is that I wanted the basic structure to be solid before I worried about optimizing each column if the column may be changed shortly after.

    I am happy to see there’s people out there like you who will call me on such things. :) I appreciate all feedback, and especially feedback that can help keep the plugin on course like that.

    mark

    17 Nov 09 at 222:51 pm

  24. Mark,

    New data is being recorded. I checked the database, and nothing before the upgrade was in there. I’m not sure where the data went :)

    VERY happy to hear that more performance upgrades are in the works. That is my only complaint with SPR. I love the product, but I know it is a resource hog!

    Scott Hack

    17 Nov 09 at 999:36 pm

  25. Hi Mark, I just upgraded to the latest version of your plugin. I am running wordpress 2.8.6. Everything works fine but when I enter to the option page, i do my settings and press save… the page tries to load and then it is blank. If I go back the settings looks that they have been saved… What I am trying to say is that in my case, the Save buttons from the option page return a blank page…

    Thanks,
    Bogdan

    bampi

    2 Dec 09 at 555:30 pm

  26. I haven’t come across that personally – I wonder if it has something to do with the new options API that Wordpress uses. The handling is done by the Wordpress options page itself, and should just return you to the plugins options page when it is done.

    There might be a conflict somewhere, perhaps with another plugin? If you want to email me a list of the plugins you use, I could see if I can recreate.

    mark

    2 Dec 09 at 777:41 pm

  27. Hi,

    Thanks for a great plugin. I am wondering why my kStats widget is suddenly showing the amount of time it took for the page to load. Is there a way to remove that information?

    Brian

    2 Dec 09 at 888:56 pm

  28. Because I’m a retard learning disabled.

    I had a report of somebody mentioning that when they activated the widget it was slowing down the entire site. I’ve been working on two projects for the past week, and I was doing testing on that, and completely forgot when I tagged the new release.

    I’ll fix it asap. :P

    mark

    2 Dec 09 at 999:19 pm

  29. Fixed in 0.7.3

    mark

    2 Dec 09 at 999:26 pm

  30. Thanks, Mark! =)

    Brian

    3 Dec 09 at 666:25 am

  31. Hey,

    Thanks for this great plugin :D But i’ve just tried upgrading but when i click Upgrade Now i only get “Upgrading kStats” and the kStats logo…wasn’t sure if it’s been brought up before, but it’s been doing this for ages. It upgraded fine on my other 3 sites, not sure why this sites kStats isn’t upgrading :(

    Thanks in advance.
    Daniel :)

    Daniel

    3 Dec 09 at 333:55 pm

  32. I should put some kind of warning there – depending on the size of your database, some upgrades may take considerably longer than others. It seems redundant to add the workload of placing a status bar there, but maybe I’ll look into it.

    The upgrade to the 0.7.x series fixes a possible security vulnerability, and has to search the raw and charts tables for specific values that weren’t properly encoded before, encode them and put them back in. If you have a larger set of data from a higher traffic site, this process can take some time.

    mark

    3 Dec 09 at 444:02 pm

  33. Hi Mark. I’ve been trying your plugin and so far so good. I was wondering if it’s possible to exclude a hostname instead of an ip. The point being most authors have dynamic ip’s. I use dyndns to track my ip changes. If I could enter that hostname than my own machine would get excluded.

    Well, congrats on this excellent plugin!
    Duarte

  34. really nice functional plugin, great. thank you very much. is there a way to show some stats on a frontpage by shortcodes, functions?

    Lazy

    9 Dec 09 at 555:57 am

  35. some screenshots would be nice :]

    max

    10 Dec 09 at 444:14 pm

  36. @Duarte,
    Thanks for the feedback! I have plans to increase the control administrators have over how kStats records information, including of course what information not to record. This should be a fairly easy update to include so I will definitely look at getting it out with the next update!

    mark

    14 Dec 09 at 555:29 pm

  37. @Lazy,
    This feature was just recently requested by another person too, so it’s been put on my todo list. I hope to have it included in the next update, based off the same codes that are currently available in the kStats Widget.

    mark

    14 Dec 09 at 555:31 pm

  38. @Max,
    On my site, I’m assuming you mean? Probably a good idea – they’re located here in the Plugin Repository, but I’m considering doing an overhaul of my site anyways. Primarily to put a little more focus on the plugin, which would definitely have to include some kind of a screenshot/demo section.

    mark

    14 Dec 09 at 555:32 pm

  39. hey i have a suggestion, as an artist referrers are important to me to see if i have been featured/check how my publicity is going.

    if there was a way to see say, ‘referrers from the last 7 days’ that would be AWESOME. right now i have to comb through the long referral list which is kinda inconvenient.

    Louise

    16 Dec 09 at 555:48 am

  40. This is great so far. Thanks for making this! One thing I can’t figure out–how do I view the data going back a few days/weeks? Is that saved somewhere?

    Dan

    22 Dec 09 at 777:07 am

  41. @Louise,
    I’ve been away from development for quite some time now, working on paid projects and more importantly, doing the holiday season thing. I apologize for the delayed response on this as I wanted one of the defining features of this plugin to be quick support, or at least acknowledgement.

    I am going to release a bugfix release either later today or tomorrow which addresses a few issues people have been having with my choice of cutting edge php functionality – after that I am going to start migrating the plugin to a completely new database format which will allow for things such as your request, and much much more detailed reports on site activity. Please keep an eye out!

    @Dan,
    You can at this time modify your settings on the options page to keep raw data (under Database Options). You can then alter the Recent Hits display to reflect this, or a portion of it.

    As I mentioned above, once I have migrated to the new database structure, you will be able to go back and view selected blocks of time, or the entire dataset from installation to present. I think this will greatly improve the functionality of kStats. :)

    mark

    29 Dec 09 at 222:17 pm

  42. Plugin is working well so far…

    david

    29 Dec 09 at 555:12 pm

  43. Mark,

    I’m back (from Nov3 comment). I’m using kStats again. Will give you feedback when I notice something unusual.

    My apologies for my comment the first time I was here. I was a newbie and I panicked. I understand my cPanel better now, lol. Thanks for doing this for us.

    Jojo Agot

    30 Dec 09 at 111:00 pm

  44. The aggregation doesn’t appear to be working on my site, there are no rows in the kstats_totals table. Is there a way to call it manually? any suggestions on debugging this?

    I tried the latest version to see if that would resolve the issue and it did not (The last upgrade wacked all my options and ignore list BTW).

    I run a PS on Dreamhost, so pretty much anything is possible…

    Joe Vandermark

    31 Dec 09 at 222:40 pm

  45. @jojo,
    No apologies necessary. If I was trying to run a new plugin and it crashed my site, even though I know my way around I would be a little upset too. Hopefully we won’t run into those problems again. :)

    @Joe,
    I would be very interested in discovering the cause of this. With my upcoming release (see article here) I may be moving away from the current aggregate system; I don’t have an accurate timeline for its release though so in the meantime we should definitely get that figured out.

    Something has been wonky with the upgrade process wanting desperately to overwrite the ignore list since I put it into place. I’ve yet to track this down, but it’s high on my priority list.

    If you wouldn’t mind contacting me via the Contact page, so I could communicate with you in email I would be happy to look into this asap.

    mark

    31 Dec 09 at 444:21 pm

  46. Contact page doesn’t appear to be working- “Failed to send your message. Please try later or contact administrator by other way.”

    Joe Vandermark

    31 Dec 09 at 666:44 pm

  47. go ahead and send your email to my spam account: opmjdv@hotmail.com and I’ll reply with my “working” email.

    Joe Vandermark

    31 Dec 09 at 666:50 pm

  48. That’s a bummer. I’ll have to look into the form – sadly my site takes a huge back seat to work and can fall behind on a few things.

    Email sent. :)

    mark

    3 Jan 10 at 111111:37 am

  49. like the plugin .. noticed this in the server log

    php 5.3.1 on Litespeed

    [STDERR] PHP Parse error: syntax error, unexpected ‘}’ in /usr/local/lsws/zerohype/public_html/wp-content/plugins/kstats-reloaded/lib/_async.php on line 39

    jacksprat

    23 Jan 10 at 444:23 pm

  50. was wondering if the spiders numbers are included in the total visitors number. say there are 10 visitors and 4 spiders. are the 4 spiders part of the 10 visitors?

    thanks

    shawna

    25 Jan 10 at 444:07 pm

  51. I love the plugin. Its usually delivers everything it promises. I am having one problem as of late. It hasn’t been giving me any of my visitor stats, spider stats only feed stats. The chart is all brown instead of the normal blues and oranges. Thanks

    Monica

    3 Feb 10 at 101010:28 am

  52. Hello!
    I translated into Russian by 80% plug kStats Reloaded. But the problem is that the Russian characters are displayed incorrectly. It is possible to maintain the database encoded 1251_general_ci (statpress-reloaded doing so).
    If you make a correction, I test the plugin and send you Russian localization.
    P.S. is a cool plugin!
    (translated by Google)

    Boris

    8 Feb 10 at 121212:48 pm

  53. I am showing high levels of traffic on Kstats and barely any visits with google analytics. Why is this?

    James

    9 Feb 10 at 121212:05 am

  54. This is my favorite stats plugin, thank you.

    Are you thinking to include “last referers” feature? (top referers is already included i know)

    Caner

    12 Feb 10 at 333:15 am

  55. Same problem as James reported 2 messages up. I appreciate your plug-in, because it is incredibly easy to set-up, and gives clear information. But I fail to understand why there is so much difference with the data from Google Analytics.

    elji

    15 Mar 10 at 888:30 am

Leave a Reply