Top users WordPress plugin

I wrote a new plugin to list the contributors to a WordPress website. The comment and post counts are added together, and the top X users are listed in a simple table alongside the counts.

See this plugin in use at


Installation instructions

  1. Upload the `top-users-by-comment-plus-post-count` folder to the `/wp-content/plugins/` directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Place this or a similar function call in your theme: <?php top_users_by_comment_plus_post_count( 10 ); ?>

CSS sample

This is the CSS I am using to style the output.

#top-users-by-comment-plus-post-count td.tu-author{ padding-right: 8px; }
#top-users-by-comment-plus-post-count td.tu-count{ text-align: right; }

Sample output

I added tab and line break characters for readability.

<table id="top-users-by-comment-plus-post-count">
	<tr><td class="tu-author">DisgustedInDenver</td><td class="tu-count">297</td></tr>
	<tr><td class="tu-author">Corey</td><td class="tu-count">109</td></tr>
	<tr><td class="tu-author">G11</td><td class="tu-count">60</td></tr>
	<tr><td class="tu-author">jmbecker13</td><td class="tu-count">10</td></tr>
	<tr><td class="tu-author">trustmedotcom</td><td class="tu-count">9</td></tr>
	<tr><td class="tu-author">ulfwolf</td><td class="tu-count">8</td></tr>
	<tr><td class="tu-author">noscamsforme</td><td class="tu-count">8</td></tr>
	<tr><td class="tu-author">who8dapple</td><td class="tu-count">7</td></tr>
	<tr><td class="tu-author">cindmo</td><td class="tu-count">7</td></tr>
	<tr><td class="tu-author">nytemare4u</td><td class="tu-count">7</td></tr>