I was chatting with my buddy ryan earlier about PaulStamatiou.com and noticed the little word/comment counter he has in the header of his blog. I thought it was cool, so I wrote a wordpress plugin to generate the same stats for my blog! Now I’m making it available to you. I’m calling the plugin Impress, and you can download it here (pretty-printed version).

Here’s how you install it:

Save the file to your wordpress plugins directory (wp-content/plugins) as impress.php Activate the plugin under the plugins tab on the wordpress admin panel (it should be the one called Impress) Place a call to the impress() function in your header.php, footer.php or some other template file - it should look like <?php impress(<format>); ?>

That’s all!

The impress function takes one argument: a specially formatted string that determines what the output will be. There are six special keywords that will be replaced with your statistics, the rest of the string can be anything (it will be displayed along with the stats). The keywords are :users, :posts, :pages, :comments, :categories, :post_wordcount, :page_wordcount, and :comment_wordcount. They’re pretty self explanatory, so I’ll let you figure out what they mean.

Here’s an example from my blog (see the lower right-hand corner):

<p><?php impress("So far I've written :post_wordcount words
in :posts posts. :comments comments have been posted,
with a total of :comment_wordcount words."); ?><p>

Let me know if you have any thoughts, comments, suggestions, etc. Otherwise, enjoy!

Update: It’s fast, too! I’m being dugg right now and the server’s not breaking a sweat.