I now love Akismet, its an amazing little plugin and has already blocked 45 comments within the first 24 hours, all spam comments, of course!
Anyway, I was experimenting with the akismet_stats(); function, it’s useful but for some people it might be a little over the top, so thats where I come in – I’ve wrote an insanely small function to just display the raw number of spam comments that Akismet has blocked, probably been done before but I thought I’d offer you my take on it.
In the plugins/akismet.php file, right near the bottom outside any other Akismet functions, just put
function akismet_ministats() {
$count = number_format(get_option('akismet_spam_count'));
echo $count;
}
And save it. Then in your sites footer for example, just call the akismet_ministats() function by using this code:
<?php akismet_ministats(); ?>
Which will output the raw number of comments that Akismet has blocked, best used inside a sentence of some sort, like this:
<p>Akismet has blocked <?php akismet_ministats(); ?> from my blog!</p>
I hope someone finds this useful, I know I did, that’s the reason I wrote it!
UPDATE: I’ve just learned that after updating Akismet, where you used this function, it will display a PHP error about undeclared function – this is normal and just means you need to add the first bit of code in this post to the plugins/akismet.php file. Sorry for any problems caused!