Option “Consider comment time” in Antispam Bee 2.6.4
This post originally appeared in Sergej Müller’s Google+ profile (in German) and is no longer accessible there. It’s now kept here by the Pluginkollektiv.
Consider comment time” option in Antispam Bee
The idea of the time between writing and sending a WordPress comment has been with me for an eternity. However, I was not sure in which time the fastest (meaningful) comment can be submitted to distinguish it from a bot. Some time ago I did hundreds of tests and found out that spam bots need on average 2 seconds to fill out and send the comment form in WordPress. A human would never be able to do that, I claim.
The functionality
The current Antispam Bee version has implemented the consideration of comment time. The principle behind it in detail: When calling an article page with comment function, Antispam Bee sets the current timestamp in the source code of the web page. When the form is submitted, the Antispam Bee plugin calculates the time that lies in between. If the time difference is less than 5 seconds, it is spam. The time limit will be adjustable later via selectbox, currently the value can be controlled via hook.
The filter “Consider Comment Time” was deliberately placed after the “Trust Approved Commentators” function to exclude known commentators from the check.
Spam comments that Antispam Bee has filtered out based on the too short comment time will be noted in the Spam Overview with “Comment time” as spam reason.
Not with caching plugins
Unfortunately, this function is not usable with website caching. Reason: The timestamp generated in the source code of the blog pages is also cached and is unusable for evaluation by Antispam Bee. Therefore the – by default inactive – option should only be used on WordPress blogs without caching plugins like Cachify & Co.
Feedback welcome
Please give me feedback on the built-in function. If it’s hardly used (because really all WordPress blogs nowadays rely on caching mechanisms), there’s no reason not to undo the implementation. Otherwise, the functionality can be further extended.
Antispam Bee 2.6.4 is now available for update.