Spam Karma 2 Akismet Plugin
I have updated the Spam Karma 2 Akismet Plugin that was released as BETA some months ago. I don’t want to be like all those hip web 2.0 permanent betas, so we leave this state for now. I bumped the version number of this small plugin to 2.0 and made some modifications:
- fixed a logic error which prevented the plugin to submit some corrections to Akismet.com
- changed some strings and default values (now checks against Akismet.com more often to give that service more to eat)
- there is now a little readme in the php-file
- fsockopen could produce php warnings which revealed the wordpress.com api key which was fixed, too
The location of the plugin is the same as before: sk2_akismet_plugin.zip
Make sure you have an installed Spam Karma 2.x, download the zipfile, unzip it to your wp-content/plugins/SK2/sk2_plugins directory and enter your Wordpress.com Api Key (now available for free if you sign up there and I should get money for referring people there *g*) in the Spam Karma 2 settings. Finished! Nothing more to do for you 
If you are upgrading, you only need to copy the sk2_akismet_plugin.php from the zip over your old one.
Have a spamless blog and a good time!
P.S.: Bug reports go into the comment section. Thanks!
P.P.S.: 156 downloads of the beta in the last 3 months. Thanks!
Update:
Version 2.1 now features the display of its own version and I have recorded 640 downloads so far 
Weitere Artikel, die dich vielleicht interessieren könnten:
- Spam Karma 2 Akismet Plugin BETA BIG BIG UPDATE: This plugin is no longer BETA! The location of the zip containing the plugin did not change...
- Spam Karma 2 Wie mir dieses Plugin entgehen konnte, ich weiß es nicht. Aber es leistet göttliches beim unauffälligen Entfernen von Spam (Kommentare...
- Realstats Plugin Es wird langsam … noch ein bisschen herumbasteln und ich habe das perfekte Statistikplugin. Neu auf der rechten Seite: die...
- Quickfix Del.icio.us Integrator Plugin Del.icio.us hat scheinbar schon wieder seine API umgestellt und so kann man leider nicht mehr die letzten Links per http://usernameassword@del.icio.us/api/posts/recent,...
- Das Top Commenters Plugin wirkt Und wie es wirkt Da hatte jemand Steffi eine interessante Abendbeschäftigung und ich werde das jetzt nicht alles “re-kommentieren”, nene...












Good job on this. Does the plugin look up Akismet while SK2 calculates the karma?
Apparently the apostrophe in my name causes a problem with the comments on your site!
Thanks Ajay (fixed that apostrophe error). The plugin checks the comment against Akismet after SK2 calculated the karma. You can change that behaviour by assigning different values to the “register_plugin” function call at the bottom of the php file, but the default (executed as the last plugin) should be ok for everyone.
Thanks for this great plugin! I was debating which plugin to use (SK2 or Akismet) and now I can have the best of both!
Habe jetzt das SK2 Askimet Plugin auch installiert, nachdem mir heute ein spambot durch SK2 gerutscht ist.
Komischerweise funktionierte der Trackback nicht. Im Spamfilter haengengeblieben?
Great work! I recently noticed that some spam gets through the “bare” SK2 plugin. I hope the last remaining few commentspams get caught by this addition !
BTW: Nice theme.
I use Wordpress on my hosted account. I just unstalled SK2 and uploaded sk2_akismet_plugin.php to the proper directory. I do not see SK2-Askimet on the plugin screen. Is it just working automatically?
I meant to write installed, not unstalled!
Hello Phil, the plugin will not be listed in the normal pluginlist, but instead inside the spam karma management screen …
Thanks. I finally figured out how to get the API key, from a Wordpress.com blog.
I noticed that SK2 is available under both the Manage tab and the Options tab. I use Wordpress v.2.0.2
Phil
Are you supposed to activate the Akismet plug-in that comes with WP?
Hello sygyzy, no you aren’t. This plugin here is a complete implementation (you may say copy) of the original plugin. The wordpress plugin api doesn’t allow for multiple plugins to classify a comment … only the last one that sees the comment decides if it’s spam or ham. Therefor this “copy” of the original was neccessary
Sebbi – Just for clarification’s sake. I upload your plugin and activate it. When I go to the plugin page in WP, I also see the Akismet plugin. I leave that deactivated. In the Spam Karma 2 options, under the plugins section, I enter my Wordpress API key. That’s it?
How do I know it’s “working”?
I’ve found what I think might be a bug. If I look in the approve comments section, the latest entry is clearly a SPAM trackback. So I check the box and have it run through Akismet. The red status text says “Submitted to Akismet as ham. Akismet say it’s SPAM.” After it reports that, nothing happens. It still just leaves it in the approved state.
1. How did it get to the approved state in the first place?
2. Barring that, how come after Akismet says it’s spam, it doesn’t get moved to moderated or the spam section?
sygyzy, yes that’s it. You know it’s working when you hover over the karma points of a comment and you see “Akismet says it’s ok/spam”. Not all comments (those already having a pretty hight negative karma) get send to Akismet for classification, so it may not appear everywhere.
The bug: it’s not a bug, it’s a feature. Running the Akismet check over a comment again only adds/subtracts the karma points of this check (default: 7). This may not be enough to turn the comment into spam. If you want to do that you have to click on “moderate selected”. SK2 automatically moves the marked comments to the spam section and sends a notification to Akismet that it was wrong about the comment.
@1. You can see the reasons for the karma value if you hover (mouse over) over the points.
@2. If other modules of SK2 decided it’s ham and gave the comment enough points, Akismets default -7 points (saying it’s spam) might not be enough. I implemented it this way because Akismet isn’t always the better choise (SK2 alone is very good in the spam fight). If you feel the Akismet check should have more to say, update its strength (general setting) to strong or supastrong
Sebbi – You are correct on all fronts. I verified it is working. Also, I found out why my spam trackbacks and comments were still marked as valid. They all came from repeat offenders and apparently due to the Snowball Effect (granularity), this awards the commetner with like 500 points. There is nothing in the world that could cancel that out!
The “Snowball Effect” is indeed a problem if the first spam comment was identified as ham. While it never happened on my blog I imagine deleting hundreds of false-positives wouldn’t be a lot of fun. However the author of SK2 wrote something about bayesian filters and neural nets for the next version in a news update. I’m looking forward to that (in hopes it further hinders those nasty spamers out there)
Hi. I don’t have much to add to the above except… this is awesome.
Thank you so much for the effort.
Okay, I do have one small request. Could you please add the line in so the plugin tells us what version it is? I believe you do it by adding a line like this in the variables:
var $plugin_version = 2.1;
Danke!
Thank you for the request. I modified the plugin that it shows its version.
Lately I discovered an annoying bug: SK2 does not seem to be able to recover or moderate multiple comments at once. I don’t know if my plugin causes this or if it’s a general problem of the newest SK2-release.
The version display doesn’t quite work. Try this:
var $plugin_version = 2.1;
var $show_version = true;
Note that it’s “$plugin_version” not “$version”.
With these two lines in there, the Spam Karma 2 options page will show the version of your plugin, which is awfully handy when we’re checking for updates!
Still awesome. Much cleaner than using a whole separate WP plugin for Akismet. Thanks.
Oops, something went wrong with the zipfile (two versions were packed together). I hope that I got it right this time.
Thank you for reporting it … again
well, let’s give this one a try then…
Been using both for a while, now I can let them work together! Thanks!
Where can I get it from?
The link is hidden in the text of the article
Maybe Im missing something but…
Should I be keeping the Wordpress Akismet plugin active at the same time I have Spam Karma (with your plugin) active? Or should the Akismet plugin be de-activated?
Hi Dave and thanks for asking!
The original Akismet plugin (shipped with Wordpress) is not needed and it should not be activated next to an active Spam Karma installation.
The reason i wrote this SK-plugin was because you can not have multiple cooperating spam plugins in Wordpress. This SK-plugin is escentially the original Akismet plugin rewritten to work with Spam Karma, because Spam Karma has an interface for other spam fighting mechanisms.
Can you please add the “subscribe to comments” plugin? So you can notify us when you have released an update.
Hmm … last time I used that plugin nobody but some fake-adresses subscribed to the comments
… why don’t you subscribe to the RSS-Feed of the comments instead? You could use http://www.feedblitz.com/ if you want to be updated via mail 
Yupp, you are right.
So I don’t need the “legacy” akismet-plugin anymore when I have installed this version? The “problem” here is: akismet overrules all decisions made by the battery of sk2-plugins. 
SK2 even is not learning when akismet is enabled. And is it possible to re-add the “Recent Spam Harvest” to the dashboard? (e.g. a link to YOUR_URL/wp-admin/options-general.php?page=spamkarma2&sk2_section=spam
?
Then I just need to check-out the dashboard.
Btw: If you don’t know the right “hook” to use, try this:
add_action(‘activity_box_end’, ’sk2_admin_stats’
;
Surely you need to code this function (not class method!)
Well, ich komme aus Deutschland, tippe aber lieber in Englisch meine Fragen, damit andere auch was verstehen!
Hello Quix0r,
I believe such a function (showing up on the dashboard) should and probably can only be handled by Spam Karma itself. But development of SK has essentially been halted for the last few months … maybe Dr Dave has lost interest in this or he thinks it’s good enough (it really is!!!) for the time being, I don’t know
Hmmm, I have a “legacy” (WordPress-native) anti-spam plugin here which targets on the POST request URI itself. They are up to 99.9999% like this: “POST /wp-comments-post.php” I asume here you have no sub-folders.
My plugins inserts with a ProtoType (so JavaScript) observer an unique string into it, e.g. “wp-comments-post-xxxxxxxxxx.php”. After the POST request mod_rewrite rewrites it back to “wp-comments-post.php?cpr_code=xxxxxxxxxx by xxxxxxxxxx is “server-unique data”.
Well, this might be a usefull plugin. So is there a tutorial or something where I can start with to code a “binding” to my legacy plugin? So when my plugin runs in SK2-mode it shall not run again in “legacy-mode”…
I might not really understand what you want to do, but if you are trying to write a “plugin” for Spam Karma, please refer to the documentation (including sample code) shipped with Spam Karma.
Nice idea, btw. I think somebody has already brought that up on the wp-hackers list. Was that you?
I abandoned Akismet a while ago since this script returns quite alot of false positive for me. Akismet is a decent service but it’s surely hard to prevent data poisoning (I bet that’s on the move right now) and a DoS attack.
Hello christina,
yep … I have disabled the plugin in my installation, too. Akismet was the cause too many spams came through Spam Karmas checks. Sad, but true.
What do you mean by DoS attack? Trough Akismet or against Akismet?
@Sebbi: I have written now a “binding” – in truth it is a plug-in but it binds both legacy plug-ins together – for my plug-in.
Thanks for your help anyway.
Just thought I’d let you know that from time to time, my API key deletes itself. My guess is that every once in a while, the Akismet servers get an error and falsely reports that my key is invalid. This makes your plugin delete my saved key.
I’ve edited your plugin for my own uses (to make it not remove my key on error), but I still thought I’d let you know.
Thanks for the heads up. I also thought if it would be more elegant to only check the validity of the key when it changed (like the regular Akismet plugin does) and not on every view of the adminpage.
P.S.: my API key deleted itself on the recent DNS outage of Akismet, but never before …
Thanks for the plugin Sebbi. I’ve recommended this to a great number of people
I’m not that cool yet to need spam filtering. Most of that stuff comes via my blog that catches it.
Sebbi ist schuld! Ich wussts schon immer
gracias por el plugin
Is this plugin going to be updated for the new Akismet 2.0?
Hello Dave,
there is nothing new about Akismet 2.0 except the interface. The spam-checking feature of Akismet didn’t change in that update.
This is very great that you are sharing the good idea connecting to this post, but, I advice to use the assistance of the essay writers [Linked to: 4writers].
blabla, and I advise you not to spam my blog … thx.