This plugin hasn’t been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Hikari Enhanced Comments


Hikari Enhanced Comments enhances comments with features that make comments more visible and and becoming more exciting in website structure.

Things that you’ve been wanted to do, now can be done much easier.


  • An Enhanced Recent Comments widget, based on WordPress core widget, but redesigned to make it possible to show at least 60 last comments.
  • ERC widget allows to exclude users from having their comments shown, perfect for website owners and authors that really participate on their site’s comment debates 😉
  • If you also have Hikari Titled Comments plugin installed, comments with titles have their titles listed
  • Comments authors have their gravatar shown in the ERC widget
  • For pingbacks, their gravatar is replaced by a “P” icon
  • A Most Commented Posts widget, that lists your posts with higher number of comments
  • If you have ip2nation installed (see installation instructions), comment authors are also shown with a flag of their country, in Enhanced Recent Comments widget and in comments area
  • Country flags can be added anywhere in your site, you just need to tweak your theme and use your imagination


  • Hikari Most Commented Posts widget
  • Hikari Enhanced Recent Comments widget config interface
  • A comment author with his country flag 🙂
  • A comment author
  • When Hikari Titled Comments plugin is used, comments' titles are shown!
  • Hikari Enhanced Recent Comments widget, showing all comments
  • Hikari Enhanced Recent Comments widget, excluding my comments!
  • Here's ip2nation Diagnose when everything's working
  • WordPress core, default Recent Comments widget


Is “Hikari Enhanced Recent Comments” widget related to WordPress core “Recent Comments”?

Well, in parts. PHP code is totally independant, but based on it. But it uses compatible CSS classes, so it shoud fit to theme layouts.

Can I use both core “Recent Comments” and “Hikari Enhanced Recent Comments” widgets together?

Sure! You can use them together and as many times as you want!

Is your titled comments plugin required to use the widget?

No, my idea isn’t to force somebody to use them together.

Indeed, Hikari Enhanced Comments was first idealized to be part of Hikari Titled Comments, being implemented on a future version. But when I started coding it, I saw that core “Recent Comments” couldn’t be simply extended (I did that 😛 ), and using filter wasn’t enough for me. Code was becoming too big and getting out of “titled comments” scope, and also there was ip2nation to be installed separated, so I decided to port these features to a separated plugin and make both compatible.

If both are available they work together, but they work alone pretty fine too.

Your titled comments plugin requires WP 2.9, and this enhanced comments requires 2.8, strange!

All my plugins require PHP5 because I use OOP, and WP 2.8 because I use settings_fields().

Hikari Titled Comments requires WP 2.9 only because it uses comments metadata. Even though Hikari Enhanced Comments supports Hikari Titled Comments, it only uses its functions, it doesn’t go over comments metadata directly, and since Hikari Enhanced Comments doesn’t use metadata code, it works with WP 2.8. Remember these plugins work together but they don’t require each other to do their own job 🙂

I’ve looked on HTML code your widgets generate, and noted they use ordered lists, but ERC shows no list marking and MCP shows a disc mark instead of number marks. Why did you do that?

I like to use correct semantic markup and nice styles on the same time. Both widgets list some content sorted by date or amount, so they are ordered lists, and not unordered. But, Recent comments, even more when titled comments are present, don’t fit well with list marks, while Most Commented Posts wouldn’t be nice being listed with numbers. Well at least in my theme.

These styles are added directly to the HTML document, in ‘wp_head’ action, that’s the same behavior of WordPress Core’s Recent Comments widget. If you wanna change it, just add your own style in your theme’s style.css and override them. 🙂

You your ERC widget allows to exclude users from being listed, but MCP doesn’t?

It’s all database related. For Recent Comments, it’s just a matter of defining comment’s autor to be excluded, and MySQL does the trick easily because each comment has its author name on it.

For Commented Posts, on the other hand, each post has a field informing how many comments it has, and this field is easy to use. If I’d make specific commenters be excluded, I’d have to ignore this field, make a join between wp_posts and wp_comments based on post ID, and then exclude each comment whose author name matches those defined to not be counted. This SQL query would be much heavier and I believe it’s not worthy. We could use cache to store the query and avoid it being done on every page load, but that would require another plugin to handle cache persistence. Explaining all this (or even worse, explain somebody why his site’s page load became a bit slower upon using the widget) wouldn’t be nice. Maybe someday I implement the feature, or if somebody asks me for it.

What happens if I don’t have ip2nation tables installed and working?

What the plugin does with that is query it for a country related to a IP. If tables are not accessible for any reason, the query will return with error and it’ll be ignored.

Without the country code, the flag URL can’t be created, generating an error. And even if the code is found, if for some reason the flag can’t be accesses, same error will happen.

This error is verified, and if flag is available, its tag is generated and provided. But if flag is unavailable, it will just return a harmless blank string. In HTML document there will be no track of it, and user will just see nothing where the flag would be placed.

Of course, if you are adding the flag or relying on country code or name in your theme, you must be prepared for not receiving them, due to some error or simply the plugin not being active.



  • New widget: Most Commented Posts
  • Added country name to flags title attribute (popup)
  • Recent Comments widget: fixed minor widget saving code
  • Small code cleanups


  • First public release.

Contributors & Developers

This is open source software. The following people have contributed to this plugin.


Browse the code