Latest TweetsDifference between mod_alias and mod_rewrite…
Perishable Press

BlogStats PCC Plugin

[ BlogStats PCC ] Announcing the BlogStats PCC plugin for WordPress! BlogStats PCC is the easy way to display the total number of posts, comments, categories, as well as several other great statistics for your WordPress-powered website. With BlogStats PCC, you display only the information you want, where you want — inside or outside of the WordPress loop. Completely customizable, BlogStats PCC will display any combination of statistics you choose. This plugin is highly flexible, simple to use, open source, and completely free.

Update: BlogStats PCC has been rebuilt with all new features and options. Check out Simple Blog Stats for all the action! </update>

BlogStats PCC update

New version of BlogStats PCC now available! The new version now provides all of these great site statistics:

  • Total number of posts
  • Total number of comments
  • Total number of categories
  • Total number of members
  • Total number of guests
  • Total number of pages
  • Date of most recent update
  • Most recent commentator
  • Most recent post

Display any or all of the provided site statistics — customize your own set to provide only the statistics you want!

Installation and Usage

  1. Copy blogstats-pcc.php to /wp-content/plugins/
  2. Upload and activate via WordPress plugin admin panel
  3. Use the following tags to display your stats anywhere:
Display the entire set of statistics in a nice list format:
<?php if (function_exists('fullstats')) { fullstats(); } ?>

Display the total number of posts, comments, and categories:
<?php if (function_exists('blogstats')) { blogstats(); } ?>

Display the total number of posts:
<?php if (function_exists('poststats')) { poststats(); } ?>

Display the total number of comments:
<?php if (function_exists('commstats')) { commstats(); } ?>

Display the total number of categories:
<?php if (function_exists('catstats')) { catstats(); } ?>

Display the total number of registered users:
<?php if (function_exists('regusers')) { regusers(); } ?>

Display the total number of unregistered users:
<?php if (function_exists('userstats')) { userstats(); } ?>

Display the total number of individual, static pages:
<?php if (function_exists('pagestats')) { pagestats(); } ?>

Display the date of the most recent post modification:
<?php if (function_exists('modstats')) { modstats(); } ?>

Display a link to the most recently published blog post:
<?php if (function_exists('recpost')) { recpost(); } ?>

Display the name of the most recent commentator as a link:
<?php if (function_exists('reccomm')) { reccomm(); } ?>

Display the date of the last update in your blog's default date format:
<?php if (function_exists('recstats')) { recstats(); } ?>
Check it out: Simple Blog Stats »

Jeff Starr
About the Author Jeff Starr = Creative thinker. Passionate about free and open Web.
110 responses
  1. Statistics for number of tags? I’m missing that one, or am I overlooking something?

  2. Jeff Starr

    jack, you are right — I definitely need to add statistics for “total number of tags”.. As mentioned in the email, I will look into adding this feature to the BlogStats plugin just as soon as time allows. Hopefully, within the next couple of days!

  3. Hello Perishable,

    Any news on the number of tags option?

    Also I found that there is a mismatch between the amount of pages and posts total.
    WordPress says that there are 992 posts and 9 pages, while Blogstats says there are 1001 posts, using the poststats() function and the latest version of your plugin.

    Any idea how or why this is?

  4. Jeff Starr

    Hi jack, if you are referring to Blogstats functionality on WP 2.5, I haven’t yet tested it. I am working on it, but with my current workload it may be awhile longer before I can get there. As for the issue at hand, it seems that the poststats() function is combining the total number of pages and posts in WP 2.5? If so, this information will be useful in determining the cause of the discrepancy. Without diving into it right now, I would guess that WP 2.5 changed another parameter in the database. I will look into it as soon as possible..

  5. So is it working on 2.5.1 properly now???

    Did any one test it???

  6. Jeff Starr

    sam, although I have yet to test it myself, BlogStats should work fine with WordPress 2.5+. The only exception (to my knowledge) is that the total post count combines the total number of posts with the total number of pages (see comment #88). If you can live with that until I find time to update the plugin, everything should work fine.

  7. Godparadise June 20, 2008 @ 3:00 am

    Good Job for BlogStats PCC Plugin !!

    If you want to add a Tags number counter at this plugin, add this on your plugin page :

    // total number of tags
    function tagstats() {
              global $wpdb;
              global $numtags;
              $wp_test = get_bloginfo ('version');
              if($wp_test &gt;= 2.3) {
              $numtags = $wpdb-&gt;get_var("SELECT COUNT(*) FROM $wpdb-&gt;term_taxonomy WHERE taxonomy = 'post_tag'");
              if (0 &lt; $numtags) $numtags = number_format($numtags);
              echo $numtags . ' Tags';

    and after, add this on your template :

    <?php if (function_exists('tagstats')) { tagstats(); } ?>

    Look at the bottom of rssparadise for exemple !!

  8. Jeff Starr

    @Godparadise: that is great! I will definitely be implementing that functionality in the next version of Blogstats PCC! Thank you for helping improve the Blogstats plugin by sharing this with us! :)

  9. Great plugin! Just wondering though if there’s a bug? When displaying the number of posts, it looks like it includes posts and pages. Is there a way to only have it display the number of posts? Thanks!

  10. Jeff Starr

    @Josh: Yes, you are correct; until I find time for an update, check this comment (and the subsequent comment) for an easy fix.

  11. Ah, I should have read a bit more! Thanks for that, it was an easy fix!

[ Comments are closed for this post ]