Title: Spam Count plugin
Last modified: August 18, 2016

---

# Spam Count plugin

 *  [oriecat](https://wordpress.org/support/users/oriecat/)
 * (@oriecat)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/spam-count-plugin/)
 * I thought I saw a post asking for something like this, but now i can’t find it…
   but I made it anyway by modifying Mark Styles’ Comment Analysis Plug in.
 * `<?php
    /* Plugin Name: Spam Comment Count Version: 1 Plugin URI: http://wordpress.
   org/support/topic.php?id=29575 Author: Mindy Getch Author URI: http://moltenwords.
   net Description: Count the # of spam comments eaten
 * Modified from Mark Styles' Comment Analysis plugin
 *  */
 * /* Shows the total count of spam comments for the whole blog */
    function mg_spam_count(){
   global $wpdb, $tablecomments; $count=$wpdb->get_row("SELECT count(*) cnt FROM
   $tablecomments WHERE comment_approved = 'spam'"); echo $count->cnt; } ?>
 * I inserted it in the meta section of my sidebar with the code:
 * `<li><?php mg_spam_count(); ?> spam comments eaten without any plugins</li>`

The topic ‘Spam Count plugin’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [oriecat](https://wordpress.org/support/users/oriecat/)
 * Last activity: [21 years, 2 months ago](https://wordpress.org/support/topic/spam-count-plugin/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
