As was discussed in the last dev chat I’ll be posting here periodically about dev changes in the Akismet plugin since it ships with WP. With version 2.5 of the plugin coming soon (next day or two hopefully) we really want to make sure it is included with WP3.1 when it ships.
And with that, I give you:
Changes in upcoming Akismet WordPress Plugin, version 2.5 compared to version 2.4:
- New files:
- admin.php
- akismet.css
- akismet.js
- widget.php
The new files should be reasonably self explanatory. We’ve been breaking out the different functions of the plugin to separate files.
- Test mode
The test mode provides an additional parameter to Akismet.com API calls to let it know that you are only testing and that the API calls should not be used for learning. The test mode is enabled when WP_DEBUG is TRUE or when AKISMET_TEST_MODE is TRUE.
That last part is worth a repeat, when WP_DEBUG is TRUE then test mode is enabled.
- Spam check history
The plugin now keeps a history for each comment and the interaction with Akismet. The ‘Edit Comment’ screen will display a ‘Comment History’ section with details.
Related to this is an indication on each comment explaining what Akismet did with the comment.
- Auto retry
When a comment check fails we note that and schedule a cron job to try again later. We found that hosts would make firewall or routing changes that would prevent WordPress from reaching Akismet.com. This retry feature will take care of processing the comments that were missed during that time once the server can reach Akismet.com again.
- Clean up
Various little house cleaning items, like deprecated function calls.
- WordPress HTTP API
The Akismet plugin now uses WordPress HTTP API. The big win here is being able use the built in proxy support.
- Use complete details for spam/ham reports
When a user specifically clicks on spam/not spam we didn’t have all of the original data for the comment. This records that data so that Akismet can use it to learn from.
- Passive comment nonce
The plugin adds a nonce field to the comment form. The result of the nonce check is then passed to Akismet to help look for abuse.
- Call comment_check() on non-spam
Even if Akismet says the comment is not spam, call check_comment() to see if any other moderation items need to adjust the status of the comment.
- Link highlighting
Make links that might not be obvious in comments a bit more obvious. Some comment spam would try to hide links, making them hard to find or see when reviewing comments in wp-admin.
=================
Currently available from https://plugins.svn.wordpress.org/akismet/dev/ (our bleeding edge dev section) if you’d like to try it out. Once released we’ll also have a tag for it in https://plugins.svn.wordpress.org/akismet/tags/ (2.5) which we’ll use for the WP3.1 Akismet SVN external.
Tickets for the Akismet plugin can be created at http://plugins.trac.wordpress.org/ – be sure to set ‘Component: akismet’
Andrew Nacin 10:16 pm on December 6, 2010 Permalink |
-1. Many run WP_DEBUG in production environments. It shouldn’t be assumed that WP_DEBUG is for a development environment only. This will cause some serious issues.
It would be nice for Akismet to get a quick UI review before release, given that it remains bundled. Things like “Cleared by Akismet” don’t really blend well with the core UI, but more importantly they sometimes overlap text and make links inaccessible, such as in the recent comments dashboard widget.
Joseph Scott 10:21 pm on December 6, 2010 Permalink |
There was some discussion about the debug/test situation. It would be interesting to know how many folks run WP_DEBUG for their production servers – I’d imagine WP would strongly recommend against that.
On the UI front, I can have Dave Martin help bring any remaining items into line.
Andrew Nacin 10:25 pm on December 6, 2010 Permalink
Not really — we have WP_DEBUG_DISPLAY that, combined with display_errors = false, ensures that nothing is shown. A lot of sites I’ve worked on use WP_DEBUG with logging, and I would highly recommend that setup.
graq 9:18 pm on December 7, 2010 Permalink
Perhaps if people are using some WP_DEBUG features in a live production environment, this is in indication that they need to be available some other way. That way you can ‘enforce’ your stance that WP_DEBUG is for non-production dev environments. There is no reason for it not to be an option?
Andrew Nacin 10:20 pm on December 6, 2010 Permalink |
How will static page caching affect the nonce?
Joseph Scott 10:22 pm on December 6, 2010 Permalink |
It is possible for a cached page to fail the nonce, this is one of the reasons that for now the nonce is simply a data point and not something that specific action is taken on.
Also the nonce can be disabled (see the Akismet Configuration page).
Matt 8:17 pm on December 7, 2010 Permalink
Why is there an option for that?
Andrew Nacin 8:24 pm on December 7, 2010 Permalink
Per discussion in IRC, I suggested a filter. Not sure if it made it into the final release.
SK 9:20 pm on December 7, 2010 Permalink
Will either WT3C and WP Super Cache be affected? Offering that option sounds concerning. I feel like there are a lot of people using both Akismet and a caching tool.
Andrew Nacin 10:31 pm on December 6, 2010 Permalink |
I probably also should have commented that this all sounds awesome.
Ozh 10:58 pm on December 6, 2010 Permalink |
wow, almost shocked to read it wasn’t using the HTTP API before!
Changes Slated For Akismet « Weblog Tools Collection 8:15 pm on December 7, 2010 Permalink |
[...] Scott who is working on the Akismet plugin for WordPress notified everyone via the WordPress core development blog that there would be some changes coming to Akismet, starting with version 2.5. In version 2.5 of [...]
Alex 8:33 pm on December 7, 2010 Permalink |
Something else worth a mention is the Akismet unit test plugin:
http://plugins.svn.wordpress.org/akismet/tests/