Skip to content

New generation bStat#1

Merged
misterbisson merged 41 commits intomasterfrom
bstat-markVI
Jan 5, 2014
Merged

New generation bStat#1
misterbisson merged 41 commits intomasterfrom
bstat-markVI

Conversation

@misterbisson
Copy link
Copy Markdown
Owner

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:

  • Reporting is very basic, but better than print_r()s. Actually, reporting looks way better thanks to rickshaw, submoduled.
  • Tracking works for me, but needs more testing.
  • The tracking JS needs review, and probably performance improvement.
  • Click tracking works well enough to appear in the stats, but I fear it's underreporting.

added delete method (not sufficiently tested yet)
added some @todos
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.
Comment thread bstat.php
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The constant is: DIRECTORY_SEPARATOR

@borkweb
Copy link
Copy Markdown
Collaborator

borkweb commented Jan 2, 2014

This seems pretty solid as a whole. There's some more global comments I'd like to make:

  • There's some spacing issues. If you are trying to conform to the Gigaom standards, I suggest running CodeSniffer against it.
  • Your methods could all use comments.
  • You have a number of control structures that exceed 10 lines that need closing comments if you are aiming to conform to Gigaom standards.
  • All of your methods should have closing comments if you are aimint to conform to Gigaom standards.
  • There's a number of extra blank lines scattered throughout the files.

If you'd like individual callouts to the above issues, I can go over it after you've done a run-through with CodeSniffer.

Comment thread components/css/bstat-report.css Outdated
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Above this line add:

-webkit-border-radius: 3px;
-moz-border-radius: 3px;

misterbisson added a commit that referenced this pull request Jan 5, 2014
@misterbisson misterbisson merged commit 3e42797 into master Jan 5, 2014
@misterbisson misterbisson deleted the bstat-markVI branch October 30, 2014 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants