Title: Kama SpamBlock
Author: Timur Kamaev
Published: <strong>2014 年 11 月 5 日</strong>
Last modified: 2026 年 7 月 25 日

---

搜索插件

![](https://ps.w.org/kama-spamblock/assets/icon-256x256.png?rev=3000349)

# Kama SpamBlock

 作者：[Timur Kamaev](https://profiles.wordpress.org/tkama/)

[下载](https://downloads.wordpress.org/plugin/kama-spamblock.zip)

 * [详情](https://cn.wordpress.org/plugins/kama-spamblock/#description)
 * [评价](https://cn.wordpress.org/plugins/kama-spamblock/#reviews)
 * [开发进展](https://cn.wordpress.org/plugins/kama-spamblock/#developers)

 [支持](https://wordpress.org/support/plugin/kama-spamblock/)

## 描述

Kama Spamblock blocks simple automated comment spam. It is invisible to normal visitors
and does not use captchas.

The plugin protects the standard WordPress comment endpoint, `wp-comments-post.php`.
It adds a small check to the comment form. Direct requests that skip the form are
blocked.

This is a basic check, not proof that a person wrote the comment. Bots that load
the page and run JavaScript can pass it. Kama Spamblock does not replace a full 
anti-spam service. It also checks pings and trackbacks for a link back to your site.

Even if you are using an external comment system like Disqus, Kama Spamblock can
add lightweight protection. Automated requests can be posted directly to the ‘wp-
comments-post.php’ file, where the plugin can block basic bots.

#### Simple and effective protection

Kama Spamblock combines several small checks that are inexpensive for the site and
invisible during normal commenting:

 * The protective field name and its unique code rotate together every four hours.
   Ten recent pairs remain valid for pages served from full-page cache.
 * Each marker is tied to the specific WordPress post, so a marker copied from another
   comment form is rejected.
 * The form must remain open for at least three seconds before it can be accepted.
 * Protective fields are added only after interaction with the comment submit button.
 * If a valid comment is blocked, a JavaScript-only retry form preserves the entered
   data.
 * The retry challenge changes its HTML structure to make basic scraping less reliable.
 * Pingbacks and trackbacks must return a successful HTTP response, non-binary content,
   and a real backlink.

These checks deliberately remain lightweight. A capable bot that loads the page,
runs JavaScript, and reproduces normal browser behaviour can still pass them.

#### Using Kama Spamblock with other anti-spam plugins

Kama Spamblock can work with a full anti-spam plugin or service. It blocks simple
direct spam requests first. The other tool can then check the comments that remain.
For example, it can analyse comment text, reputation, or behaviour. The plugins 
complement each other.

For this combination to work as intended:

 * The other plugin should use the standard WordPress comment flow, or check comments
   after Kama Spamblock allows them.
 * The site must show the standard comment form and allow the plugin’s JavaScript
   to run. Set the correct ID for the form’s submit button in the plugin settings.
 * Test the setup if another plugin replaces the comment form, uses AJAX, or sends
   comments to its own endpoint. Kama Spamblock may need extra integration, or it
   may not check those comments.

## 屏幕截图

[⌊Plugin settings on standard WordPress Settings > Discussion page.⌉⌊Plugin settings
on standard WordPress Settings > Discussion page.⌉[

Plugin settings on standard WordPress `Settings > Discussion` page.

[⌊Spam alert, when spam comment is detected or if the user has JavaScript disabled
in their browser. This alert allows sending the comment once again when it was blocked
in any nonstandard cases.⌉⌊Spam alert, when spam comment is detected or if the user
has JavaScript disabled in their browser. This alert allows sending the comment 
once again when it was blocked in any nonstandard cases.⌉[

Spam alert, when spam comment is detected or if the user has JavaScript disabled
in their browser. This alert allows sending the comment once again when it was blocked
in any nonstandard cases.

## 常见问题

### When posting a comment on the site, I received a message, ‘Antispam blocked your comment!’. Is this a normal function of the plugin?

No! The plugin is invisible to users. You should navigate to the ‘Discussion’ settings
page in WordPress. At the bottom, you’ll find ‘Kama Spamblock settings.’ Set the
correct ID attribute for the comment form submit button there. You can obtain this
attribute from the ‘source code’ of your site’s page where the comment form is located.
Look for: `type="submit" id="??????"`.

## 评价

![](https://secure.gravatar.com/avatar/56454e5f57808f1495ad1a0dc990e5370ecc9f95e398d82d32b484684317a473?
s=60&d=retro&r=g)

### 󠀁[When will there be an update?](https://wordpress.org/support/topic/when-will-there-be-an-update-2/)󠁿

 [krivokoso](https://profiles.wordpress.org/krivokoso/) 2026 年 3 月 1 日

Безусловно лучшее решение для борьбы со спамом на сайте, но когда ждать обновления?

![](https://secure.gravatar.com/avatar/2e8e8b938f610246e48ef381c87c5c236e811c1be819776a928e10ae5c2070d2?
s=60&d=retro&r=g)

### 󠀁[Хороший плагин](https://wordpress.org/support/topic/%d1%85%d0%be%d1%80%d0%be%d1%88%d0%b8%d0%b9-%d0%bf%d0%bb%d0%b0%d0%b3%d0%b8%d0%bd-275/)󠁿

 [Леонид](https://profiles.wordpress.org/01nileo/) 2023 年 11 月 23 日

Спасибо за плагин. Хорошо работает. Блокирует автоматический спам и пропускает нормальные
комментарии.Thanks for the plugin. It works well. Blocks automatic spam and skips
normal comments.

![](https://secure.gravatar.com/avatar/4f202270f93ddf7eb5cb985382c22fdf79c577655a21a2cf4ccadf153d77c4cb?
s=60&d=retro&r=g)

### 󠀁[Great plugin](https://wordpress.org/support/topic/%d0%be%d1%82%d0%bb%d0%b8%d1%87%d0%bd%d1%8b%d0%b9-%d0%bf%d0%bb%d0%b0%d0%b3%d0%b8%d0%bd-886/)󠁿

 [Irina](https://profiles.wordpress.org/irinashl/) 2023 年 4 月 12 日

No spam for over 5 years.Thank you!

![](https://secure.gravatar.com/avatar/e01cbb88875d19d0bab482c2ede91ddc84b157a90c241e7a2637e6f4dbb579a9?
s=60&d=retro&r=g)

### 󠀁[in a year and a half, not a single spam comment and captcha not annoys](https://wordpress.org/support/topic/in-a-year-and-a-half-not-a-single-spam-comment-and-captcha-not-annoys/)󠁿

 [Vladimir Kazakov](https://profiles.wordpress.org/v0van/) 2021 年 3 月 17 日

En: On the themes-wordpress.ru site with zero visitors I have about 700 spam comments
for a year of work, which Akismet marked as spam, they had to be opened and cleaned.
This is a waste of time. It is better that spam comments do not appear at all. right
now I use the kama-spamblock plugin and in a year and a half not a single spam comment!
kama-spamblock is a very good plugin! Another advantage is that captcha does not
annoys. no need to enter any numbers or click (like in Google recaptcha). Right 
now I want to repeat your success (take over the idea of captcha) for another CMS.
everything is so great. Ru: за полтора года ни одного спамного коментария и капча
не раздражает раньше у меня на сайте themes-wordpress.ru с нулевой посещалкой за
год работы были штук 700 спамных коментариев, которые Akismet помечал как спамные,
их надо было открывать и чистить. Это бессмысленная трата времени. Лучше чтобы спамные
коментарии вообще не появлялись. щас я пользуюсь плагином kama-spamblock и за полтора
года ни одного спамного коментария! kama-spamblock – очень хороший плагин! Ещё одно
преимущество в том что капча не бесит. не требуется вводить никакие цифры или кликать(
как в Гугл рекапча). Щас я хочу повторить ваш успех (перенять идею капчи) для другой
CMS. настолько всё отлично.

![](https://secure.gravatar.com/avatar/ec1adb6fe0eff07e1ca0feec0acc43026f0b2f3c1130bb9fa61317bf901b4fc3?
s=60&d=retro&r=g)

### 󠀁[Отличный плагин! Рекомендую!](https://wordpress.org/support/topic/%d0%be%d1%82%d0%bb%d0%b8%d1%87%d0%bd%d1%8b%d0%b9-%d0%bf%d0%bb%d0%b0%d0%b3%d0%b8%d0%bd-%d1%80%d0%b5%d0%ba%d0%be%d0%bc%d0%b5%d0%bd%d0%b4%d1%83%d1%8e-6/)󠁿

 [Nester](https://profiles.wordpress.org/hobbyits/) 2020 年 5 月 31 日

Мне очень нравятся плагины, которые имеют минимум настроек и выполняют то что от
них нужно без излишеств. Спасибо!

![](https://secure.gravatar.com/avatar/07817a8d261816638faad584095ac0f6f24b63cd06d1db2205daeb939a93c366?
s=60&d=retro&r=g)

### 󠀁[Recommend](https://wordpress.org/support/topic/recommend-39/)󠁿

 [Natalya](https://profiles.wordpress.org/nalitana/) 2019 年 9 月 5 日

Simple settings, and the result is excellent. Thank!

 [ 阅读所有17条评价 ](https://wordpress.org/support/plugin/kama-spamblock/reviews/)

## 贡献者及开发者

「Kama SpamBlock」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Timur Kamaev ](https://profiles.wordpress.org/tkama/)

「Kama SpamBlock」插件已被翻译至 2 种本地化语言。 感谢[所有译者](https://translate.wordpress.org/projects/wp-plugins/kama-spamblock/contributors)
为本插件所做的贡献。

[帮助将「Kama SpamBlock」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/kama-spamblock)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/kama-spamblock/)，查看
[SVN仓库](https://plugins.svn.wordpress.org/kama-spamblock/)，或通过[RSS](https://plugins.trac.wordpress.org/log/kama-spamblock/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/kama-spamblock/)。

## 更新日志

#### 2.0.0

 * NEW: (better spamblock) Rotate protective field names and unique codes together
   every four hours while keeping ten recent pairs valid for cached pages.
 * NEW: (better spamblock) require at least three seconds before a comment can be
   submitted.
 * NEW: (better spamblock) Bind comment markers to the specific WordPress post.
 * NEW: Make the retry challenge harder for basic bots to parse by varying its HTML
   structure.
 * IMP: Reject pingbacks and trackbacks when the source page has a non-2xx response
   or binary content.
 * CHG: Remove the static unique code setting and UTC date from comment markers.

#### 1.9.0

 * IMP: Return a 403 response for blocked spam comments.
 * FIX: Prevent malformed comment requests from causing PHP errors.
 * FIX: Use a generated unique code immediately after plugin activation.
 * FIX: Minor bugfix.
 * CHG: Min PHP version increased to 7.4.
 * IMP: Refactoring (Spam_Blocker class extracted).

#### 1.8.3

 * FIX: XSS vulnerability fixed. Thanks to [Wordfence](https://www.wordfence.com/)
   for the report.
 * IMP: Other minor improvements.

#### 1.8.2

 * Minor refactoring.

#### 1.8.1

 * Code refactoring.
 * `kama_spamblock__process_comment_types` hook added.

#### 1.8

 * FIX: WordPress 5.5 support.

#### 1.7.5

 * FIX: bug with unique code comparison.
 * Minor code fixes.

#### 1.7.4

 * CHG: changed sanitize-options-on-save function – sanitize_key() to sanitize_html_class()–
   it’s not so hard but hard enough…
 * CHG: ‘sanitize_setting’ function call. Seems it doesn’t have back-compat for 
   WordPress versions less than 4.7.

#### 1.7.3

 * FIX: options fix of 1.7.2.

#### 1.7.2

 * CHG: moved translation to translation.wordpress.org.
 * ADD: new ‘unique code’ option.
 * IMP: some code improvements.

#### 1.7.0

 * BUG: Last UP bug fix…

#### 1.6.0

 * CHG: check logic is slightly changed in order to work correctly with page cache
   plugins.

#### 1.5.2

 * ADD: deleted is_singular check for themes where this check works incorrectly.
   Now plugin JS is shown on all pages.

#### 1.5.1

 * ADD: JS included from a number of hooks if there is no “wp_footer” hook in the
   theme.

#### 1.5.0

 * ADD: Russian localization.

## 额外信息

 *  版本 **2.0.0**
 *  最后更新：**3 月前**
 *  活跃安装数量 **4,000+**
 *  WordPress 版本 ** 5.7 或更高版本 **
 *  已测试的最高版本为 **7.0.7**
 *  PHP 版本 ** 7.4 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/kama-spamblock/) 、 [Russian](https://ru.wordpress.org/plugins/kama-spamblock/)
   和 [Ukrainian](https://uk.wordpress.org/plugins/kama-spamblock/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/kama-spamblock)
 * 标签
 * [antispam](https://cn.wordpress.org/plugins/tags/antispam/)[bot](https://cn.wordpress.org/plugins/tags/bot/)
   [captcha](https://cn.wordpress.org/plugins/tags/captcha/)[comments](https://cn.wordpress.org/plugins/tags/comments/)
   [spam](https://cn.wordpress.org/plugins/tags/spam/)
 *  [高级视图](https://cn.wordpress.org/plugins/kama-spamblock/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  17 条 5 星评价     ](https://wordpress.org/support/plugin/kama-spamblock/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/kama-spamblock/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/kama-spamblock/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/kama-spamblock/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/kama-spamblock/reviews/?filter=1)

[您的评价](https://wordpress.org/support/plugin/kama-spamblock/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/kama-spamblock/reviews/)

## 贡献者

 *   [ Timur Kamaev ](https://profiles.wordpress.org/tkama/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/kama-spamblock/)