Spring Sale! Save 30% on all books w/ code: PLANET24
Web Dev + WordPress + Security

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 »

About the Author
Jeff Starr = Web Developer. Book Author. Secretly Important.
USP Pro: Unlimited front-end forms for user-submitted posts and more.

110 responses to “BlogStats PCC Plugin”

  1. Perishable 2007/10/28 5:05 pm

    New version of BlogStats PCC now available! Check out this post to read the announcement, or simply scroll up to the download portion of this page to grab yourself a fresh copy. The new version is numbered 2.3.0a, and is compatible with all versions of WordPress (1.5 – 2.3).

  2. Hi,

    I just downloaded your plugin … nice work!!

    However, I discovered a bug: poststats() counts not only posts but pages too. Simply add AND post_type = 'post' to the query. I haven’t tested the other functions.

    Furthermore I would prefer poststats to return the number only… thus I may use it more flexible.

    Again, thanks a lot for the great work!!

    Cheers,
    jj

  3. Perishable 2007/10/30 8:28 am

    JJ,
    Yes, thanks for the feedback! A similar issue was resolved awhile ago for the “latest-post” function (recpost()) using the same trick: adding AND post_type = 'post' to the database query (see comments #63-70 for the full story). There are even alternate versions of functions buried in the latest release of the plugin (v0.88) that were used for testing (look for recpageless() and rec_pageless()). In any case, we appreciate the heads up and thank you for helping to improve the BlogStats PCC plugin ;)
    Regards,
    Jeff

  4. trademark registration 2007/11/13 9:03 pm

    Just downloaded the plugin and installed it on one of my personal blogs, and it’s fantastic! Thanks so much for this. =)

  5. Muzica Noua 2007/11/25 12:45 am

    i have tested it ! it’s great ! thank you man !

  6. thank you for the simple and easy to use plugin!

  7. Perishable 2007/12/23 9:20 am

    You are most welcome, tnchick — thanks for the feedback :)

  8. Hostorials 2008/01/02 7:11 am

    Hi,

    I am using this plugin to display the entire set.

    I copied the code above you mentioned and pasted it on my static page for sitestats in the code section of the edit page.

    However, no stats is displayed.

    I am using wp 2.2.2

    Thanks for any help

  9. Hostorials,

    When you say, “code section of the edit page,” are you referring to the WordPress Admin panel found at Manage » Pages » Edit Page? If so, that is the problem — unless you have a plugin that enables WordPress to process PHP in post content, placing the function call in this way will not work. You will need to create a template page for stats and then edit it directly with the same code.

    Regards,
    Jeff

  10. Hostorials 2008/01/04 5:04 am

    Jeff…

    Thank you. It’s working now.

  11. Perishable 2008/01/05 2:55 pm

    Excellent — glad to hear you got it working :)

  12. i’m tested it and i’m glad that worked for me…
    thanks again

Comments are closed for this post. Something to add? Let me know.
Welcome
Perishable Press is operated by Jeff Starr, a professional web developer and book author with two decades of experience. Here you will find posts about web development, WordPress, security, and more »
Wizard’s SQL for WordPress: Over 300+ recipes! Check the Demo »
Thoughts
I live right next door to the absolute loudest car in town. And the owner loves to drive it.
8G Firewall now out of beta testing, ready for use on production sites.
It's all about that ad revenue baby.
Note to self: encrypting 500 GB of data on my iMac takes around 8 hours.
Getting back into things after a bit of a break. Currently 7° F outside. Chillz.
2024 is going to make 2020 look like a vacation. Prepare accordingly.
First snow of the year :)
Newsletter
Get news, updates, deals & tips via email.
Email kept private. Easy unsubscribe anytime.