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. Security Specialist. WordPress Buff.
Wizard’s SQL for WordPress: Over 300+ recipes! Check the Demo »

110 responses to “BlogStats PCC Plugin”

  1. Just wondering:

    Is there any way for the plugin to avoid showing comments caught with Akismet? All new spam-comments show on up on my ‘recent comments’-display – before I even get as far as deleting them.

    Great plugin by the way :-)

  2. Perishable 2006/10/02 7:25 am

    Peter T,

    BlogStats PCC works anywhere within the <body> of your blog documents. If you would like the plugin to show stats from your blog’s sidebar, for example, you would open the sidebar.php file located within the "/wp-content/themes/your-theme(whatever it is)/> directory, and add this snippet of code:

    <?php fullstats(); ?>

    Otherwise, within the same directory (your theme directory), open the index.php file and place the code in an appropriate location.

    I hope that helps. If you would like more help, please contact me. I would be more than happy to help you get BlogStats PCC working on your blog.

  3. Perishable 2006/10/02 7:29 am


    You are absolutely correct — only comments that have been approved should display in the "most recent comments" stats. I have made the required modifications and released a new version (1.7.9) of the plugin, which may be downloaded via the post link above. Thank you for the excellent suggestion!

  4. Incredible, my good man – thanks for the quick update :-D

    Is there any way to donate? Your plugin deserves it!


  5. great plug-in. just installed it!

  6. Thanks so much for the great plugin. Is there any way I can add something to the script to also call the “page” count? Right now it only counts posts but I would like to also show how many “page”s I have.

    Thanks so much!

  7. Perishable 2006/10/15 3:58 pm


    Including a "Page Count" stat is an excellent idea — I will look into it and report back within a few days. Stay tuned..

  8. Perishable 2006/10/15 5:38 pm


    Thanks for the comment — glad you enjoy it!

  9. Perishable 2006/10/15 5:44 pm


    Thanks to your feedback, BlogStats PCC now displays the total number of individual static pages. Download the new version (1.9.9) via the main download link above. Thanks for the idea!

  10. Hi..I cannot locate this code anywhere within my wp-admin/index.php:

    I’ve been to my server and located the wp-admin/index.php..but that code is not there. Am I supposed to access that file through my WordPress computer folder..if so also can’t find the file itself. I have a wp/options/index/phpfile..but there’s nothing in it.

    Help..am probably missing something very simple so forgive me.

    This is what’s in my server public_html / wp-admin/indexphp file:

    [ – edited – ]

    Thanks for the help.

  11. Perishable 2006/10/17 4:36 pm


    I assume you are trying to insert the stats function into your admin dashboard as per comment #12, above. If that is indeed the case, then open wp-admin/index.php (either online or offline) and look again for this code (you could even do a find/search for it):

    <div id="zeitgeist">
    <h2><?php _e('Latest Activity'); ?></h2>

    This code is identical in your particular version of WordPress (2.0.1) and should definitely be present (near the top of the document) in order for your site admin to function properly.

    Try logging in to your admin section and see if the dashboard is looking up to snuff. If it feels right, then the specified code should be in the file location indicated. If you are certain that the file lacks such code, you could always unzip a fresh copy and restore it.

    Note: Most of the code you posted in your previous comment was "eaten" by WordPress. From the shreds of php that remain, it appears that you copied only a portion of the entire document. Try checking again, only this time please do not post the code. Thanks;)

  12. A very good and clean plug-in.
    I have translated your plug-in to spanish (Spain). If you’re interested, send me an email.


Comments are closed for this post. Something to add? Let me know.
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 »
Blackhole Pro: Trap bad bots in a virtual black hole.
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 :)
BF Sale! Save 40% on all Pro WordPress plugins and books w/ code FRIDAY23
Get news, updates, deals & tips via email.
Email kept private. Easy unsubscribe anytime.