tw-blacklight plugin for WordPress

WordPress includes several different tools for catching and filtering comment spam. There are several options built-in including a keyword blacklist; the Akismet plugin; and of course many other spam filtering plugins are available.

A problem I’ve recently discovered with this is that WordPress doesn’t show the reason each comment was considered spam. The comment just shows up on the Spam tab, and the blog administrator is left to wonder why. In many cases this leads users to conclude that their spam filtering plugin is inaccurate, when in fact the real cause was an item they added to their Comment Blacklist.

The tw-blacklight plugin is a simple proof-of-concept plugin designed to help reduce this ambiguity. When browsing comments in the wp-admin dashboard, keywords and addresses that match items in the blacklist are highlighted (or rather “blacklighted”) by the plugin, like this:

This makes it much more obvious when a comment was caught by the blacklist, rather than a comment filtering plugin.

The plugin is not perfect, and I’ve deliberately omitted some obvious features (like extending the same concept to the comment moderation feature). There’s something of a spaghetti mess of filters and actions surrounding the WordPress comment display code, and I had to resort to a couple of ugly hacks to avoid breaking links and markup. And of course the plugin only helps to distinguish blacklisted spam from others – it can’t distinguish between different spam filters when more than one is present, or when a comment was caught by the blacklist and a spam filter plugin. Resolving those issues almost certainly requires changes to the core code.

I’m hoping the plugin might help shed some light on the best way to solve those problems, so feedback is most welcome.

You can download the plugin here:

tw-blacklight v1.0

It’s a single uncompressed file; just place it in your wp-content/plugins/ folder to install, then activate it on the Plugins tab of your dashboard.

Commenting is closed for this article.