New generation bStat#1
Conversation
I stole a lot of code from @methnen for this
Abstract is now more of a parent, with its own insert(), select(), and delete() methods which do sanitization and set defaults, then call methods in the child/implementor class.
plus bugfixes throughout
...and now allowing filters when calling the other report methods
A library for timeseries graphing also changed the timeseries method to expecting minutes instead of seconds and outputing a proper timestamp maybe fixed some bugs too, but probably created way more
...that conforms multiple time series to the same time space. Also added the first report template. Expect more. Rickshaw changed so it doesn't automatically register or enqueue when instantiated.
There was a problem hiding this comment.
I'm assuming this is out here because it has to be for WP magic? If not, the bStat class would be a good home.
There was a problem hiding this comment.
Yeah, __FILE__ needs to be reference the plugin bootstrap. The alternative is dirname( __DIR__ ) . '/bstat.php', though that would only work on a unix system and I can't remember the constant that represents the directory separator. Actually, that criticism can be applied to all our code.
There was a problem hiding this comment.
The constant is: DIRECTORY_SEPARATOR
|
This seems pretty solid as a whole. There's some more global comments I'd like to make:
If you'd like individual callouts to the above issues, I can go over it after you've done a run-through with CodeSniffer. |
There was a problem hiding this comment.
Above this line add:
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
Version 6 is a complete break from the past, with a greater focus on the activity stream and less support for historical analytics. It is also strictly focused on posts, and has no support for tracking activity on pages that can't be resolved to a post ID.
I added comment tracking (see
class-bstat-comments.php) as an example of how to integrate other plugins so they can track additional activity. Ecommerce events, for example would be nice to integrate. I'm thinking the reporting screen needs to also support actions and filters that allow other plugins to report there as well.The old tables are abandoned, and this code does not (yet?) have a migrator for any of the data in them. I'm really not sure if any of the old data can be migrated or would have value in the new plugin.
Current condition:
print_r()s. Actually, reporting looks way better thanks to rickshaw, submoduled.