Title: Comment analysis plugin
Last modified: August 18, 2016

---

# Comment analysis plugin

 *  [lambic](https://wordpress.org/support/users/lambic/)
 * (@lambic)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/comment-analysis-plugin/)
 * I know there are some plugins that do this kind of stuff already, but I used 
   this as a learning project to create my first plugin.
    I’ve created a plugin 
   called comment_analysis.php which has various functions to report on comments.
   So far I have the following functions: comment_count() shows total comment count
   for whole blog comment_last($format) shows date and time of last comment comment_latest(
   $count, $length) shows first $length chars of latest $count comments with comment_author_link
   and a link to the post comment_latest_post($count, $show_count) shows $count 
   posts that have the latest comments, with optional count of comments comment_most(
   $count, $show_count) shows $count posts that have the most comments, with optional
   count of comments. You can see it in action at [http://www.lambic.co.uk/blog](http://www.lambic.co.uk/blog)
   at the bottom of the right hand column. I’m not ready to release the code publically
   yet, but I’m interested in any feedback on the functions I’ve written, and any
   other functions you think the plugin should contain.

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Thread Starter [lambic](https://wordpress.org/support/users/lambic/)
 * (@lambic)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/comment-analysis-plugin/#post-101914)
 * Added
    pingback_count trackback_count pingback_last trackback_last
 *  Thread Starter [lambic](https://wordpress.org/support/users/lambic/)
 * (@lambic)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/comment-analysis-plugin/#post-101921)
 * ok, I’ve made the code available at
    [http://www.lambic.co.uk/wp-plugins/comment_analysis.phps](http://www.lambic.co.uk/wp-plugins/comment_analysis.phps)
   Download it, rename it to …/wp-content/plugins/content_analysis.php, activate
   it in the plugin manager, and use the functions in your template. There’s an 
   example at the top of that file. I put ca_ in front of all the function names
   so there’s less chance of conflicts. I’ll register it with the various plugin
   databases rsn.
 *  Thread Starter [lambic](https://wordpress.org/support/users/lambic/)
 * (@lambic)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/comment-analysis-plugin/#post-102127)
 * Added
    ca_commentor_latest ca_commentor_most
 *  Anonymous
 * [21 years, 7 months ago](https://wordpress.org/support/topic/comment-analysis-plugin/#post-102275)
 * That’s one neat plugin! 🙂
    I wonder though if it’s possible to exclude yourself
   from the comment_latest and commentor_most functions? And also, instead of just
   having the commentor’s name and his/her total comments, could we have:
 * > Commentor – Total Comments
   >  Date of last comment Entry of last comment
 *  Thread Starter [lambic](https://wordpress.org/support/users/lambic/)
 * (@lambic)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/comment-analysis-plugin/#post-102307)
 * ca_commentor_most and ca_commentor_latest already have an exclude parameter, 
   which is a comma separated list of author names. I’ll add exclude parameters 
   to the other functions when I get a minute.
    I’ll look into outputting that extra
   stuff too.
 *  Anonymous
 * [21 years, 7 months ago](https://wordpress.org/support/topic/comment-analysis-plugin/#post-102326)
 * Thanks! 🙂
 *  Thread Starter [lambic](https://wordpress.org/support/users/lambic/)
 * (@lambic)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/comment-analysis-plugin/#post-102338)
 * I’ve created a version of this plugin for WordPress 1.3 (alpha-4), as the way
   of identifying trackbacks and pingbacks is different.
    [http://www.lambic.co.uk/wp-plugins/](http://www.lambic.co.uk/wp-plugins/)
   now contains two files: comment_analysis.phps – the 1.2 version comment_analysis_1.3.
   phps – the 1.3 version If I make changes, I’ll probably do it in the 1.3 version
   first, then backport it when I get the time.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Comment analysis plugin’ is closed to new replies.

 * 7 replies
 * 2 participants
 * Last reply from: [lambic](https://wordpress.org/support/users/lambic/)
 * Last activity: [21 years, 7 months ago](https://wordpress.org/support/topic/comment-analysis-plugin/#post-102338)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
