Screenshot of MiniZeitgeist in action

glossary definition:=MiniZeitgeist is a WordPress plugin that charts how much spam your blog receives on a daily basis. It is based on Timeplot and relies on Akismet for WordPress, a large-scale blog comment spam analyzer. Like the world-wide statistics provided by Akismet's Live Spam Zeitgeist, MiniZeitgeist shows you how much work Akismet does for your own blog on a daily basis.

Contents

Caveat

Timeplot does not yet work on Internet Explorer and certain older versions of modern browsers. See Timeplot Limitations for more.

Requirements

  • MiniZeitgeist has been tested on WordPress 2.2.2 and should work with any 2.x branch
  • Akismet must be installed and running
  • The Akismet option to discard spam on posts older than thirty days currently causes MiniZeitgeist to ignore all of those spam comments. Disable it to get the most accurate picture.

Installation

Unpack the archive. The resulting directory (minizeitgeist) should be placed in your plugins directory; do not rename it, the plugin expects to find files there. Browse to your plugin management page and activate the plugin (you may get notice that a table is not available; you can ignore the warning, it was just installed after you activated successfully). Place the token <!--minizeitgeist--> in any page. Browse to it (using a Mozilla-based browser or Opera). You should now see the past two weeks of spam and approved comment activity on your blog.

MiniZeitgeist will continue to track comment activity and the plot will be updated immediately accordingly. MiniZeitgeist operates in UTC time to make plots easier to compare.

Live Examples

Under the Hood

When a new comment enters WordPress, it goes through a preprocess_comment filter. This is where Akismet comes in and does a spam check on the comment. If the option to auto-discard spam on month-old or older posts is set, Akismet also stops the entire comment operation here if the comment is spam, in which case it never makes it into the database.

After the preprocess_comment stage, the comment goes through a few more filters, including wp_filter_comment, which potentially makes cosmetic changes to comment attributes, and wp_allow_comment before it's stored in the database and the comment_post action is run. The wp_allow_comment filter may also stop comment operation and prevent addition to the database if the comment is a duplicate or if a comment flood is detected.

Since MiniZeitgeist runs during the comment_post stage, there are two cases where Akismet's total spam count will go up but MiniZeitgeist's will not: Akismet's auto-toss option engaged and duplicate spam posts. So technically MiniZeitgeist is counting spam that is unique over a half-month window. This means there will be drift between MiniZeitgeist's total and Akismet's, but only because MiniZeitgeist is ignoring dupes.

To Do

  • If we start counting reality vs. what Akismet says, do we track those new stats (i.e., where Akismet misses)? Seems complete, if not particularly useful since you can't do anything to tune your own Akismet install.
  • WordPress actions surrounding comments are a little frustrating as they sometimes come before an action and after others. For instance, there's no way to know what changed when a comment is edited because the only hooks are for after the change is committed. This means the plot and stats are really just taking Akismet's word for it, and any changes in state (between hold, approved, and spam) go unremarked in those stats. For instance, if, for some reason, your own system loses contact with Akismet servers and hundreds of spam comments go into the holding queue, they won't be reflected in the statistics or plot.
  • Does WP have a cron call? It may be easier to get the numbers near midnight every day instead of tracking every comment, especially if the goal is to plot just Akismet's actions

Contributing

MiniZeitgeist is open source software and built around the spirit of open participation and collaboration. There are several ways you can help:

Licensing & Legal Issues

MiniZeitgeist is open source software and is licensed under the BSD license.

Credits

This software is maintained by the SIMILE project and in particular: