Kirby plugin · Open Source

Uniform Spam Words

Spam protection made easy

A spam protection plugin for Kirby's Uniform form plugin using customizable word lists and metrics. An optional AI check decides the close calls. Protect your forms from spam submissions without complex captchas.

Contact form rejecting a spam message Contact form rejecting a spam message
Expand

Description

A comprehensive spam detection plugin for Martin Zurowietz’s Kirby Uniform form plugin. This guard evaluates submissions using extendable word lists with configurable weights, and counts links and emails to provide intelligent spam filtering without requiring complex captchas.

Validation Features:

The guard performs sequential validation checks:

  1. Message length constraints (min/max)
  2. Word count validation
  3. Regex pattern matching
  4. Custom validation callbacks
  5. Spam score calculation from keyword detection
  6. Link and email address counting
  7. Optional AI check for messages close to the threshold
  8. Configurable threshold-based rejection

AI Check for Close Calls:

Word lists are fast and free, but they misjudge messages close to the threshold. The optional AI check asks a decision model on OpenRouter whether such a message is spam. By default it uses Jev, which answers with a probability instead of text.

  • Only messages within a set margin of the threshold are sent, clear cases stay on your server
  • Catches spam just below the threshold and lets genuine messages just above it through
  • Only the checked fields are sent, never name or email
  • If the request fails or times out, the word score decides as before
  • About 0.00002 USD and 0.3 seconds per checked message
  • Off by default

Multi-Language Support:

Built-in spam word lists for:

  • English (en) - default
  • German (de)
  • French (fr)

Language selection follows your Kirby site configuration automatically.

Advanced Capabilities:

  • Extendable word lists with custom weights
  • Link and email address detection
  • Configurable scoring system
  • Debug logging for tracking spam attempts
  • Custom word list support
  • Optional silent rejection mode
  • 24-hour word list caching for performance