PHPackages                             truecastdesign/spamless - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. truecastdesign/spamless

ActiveLibrary[Search &amp; Filtering](/categories/search)

truecastdesign/spamless
=======================

This library provides spam filtering and protection for in coming content.

v1.1.3(2mo ago)115MITPHPPHP &gt;=7.1.0

Since Aug 12Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/truecastdesign/spamless)[ Packagist](https://packagist.org/packages/truecastdesign/spamless)[ RSS](/packages/truecastdesign-spamless/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (6)Used By (0)

Spamless - Spam detection class
===============================

[](#spamless---spam-detection-class)

Install
-------

[](#install)

To install with composer:

```
composer require truecastdesign/spamless
```

Requires PHP 7.1 or newer.

Usage
-----

[](#usage)

Here's a basic usage example:

```
# composer autoloader
require '/path/to/vendor/autoload.php';

$Spam = new Truecast\Spamless(['name'=>'My Name', 'message'=>'This is a message', 'phone'=>'This value is not checked']);

# 'check' should be passed the value keys you want to check
# 'tests' should be passed the tests to perform

if ($Spam->tests(['gibberish','uppercase','underscores','keywords','russian','url','html','salesEmail'])->check(['name','phone', 'message'])) {
	echo 'valid';
} else {
	echo 'not valid: ';
	print_r($Spam->errors());
}
```

Available Tests
---------------

[](#available-tests)

TestDescription`gibberish`Detects strings with 6 or more consecutive consonants, which typically indicates non-English or random text.`uppercase`Flags content where all alphabetic characters on a line are uppercase, a common spam indicator.`underscores`Detects words combined with underscores (e.g. `buy_now_cheap`).`keywords`Searches for known spam keywords from a built-in keyword list.`russian`Detects Cyrillic (Russian) characters.`url`Detects URLs or domain-like patterns in the text.`html`Detects HTML tags in the text.`salesEmail`Detects cold outreach and SEO/sales spam patterns. Flags a message if 2 or more known spam phrases are found, including common SEO pitches, video service offers, and generic cold outreach openers.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance82

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~504 days

Total

5

Last Release

89d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c93d902a3e8ff15e48cc60a8a7fe45762deed318ae92fc1b5a583179731bf1ec?d=identicon)[truecastdesign](/maintainers/truecastdesign)

---

Top Contributors

[![truecastdesign](https://avatars.githubusercontent.com/u/18723650?v=4)](https://github.com/truecastdesign "truecastdesign (1 commits)")

---

Tags

filterspamfilteringdetectiontesterchecker

### Embed Badge

![Health badge](/badges/truecastdesign-spamless/health.svg)

```
[![Health](https://phpackages.com/badges/truecastdesign-spamless/health.svg)](https://phpackages.com/packages/truecastdesign-spamless)
```

###  Alternatives

[clue/stream-filter

A simple and modern approach to stream filtering in PHP

1.7k261.7M7](/packages/clue-stream-filter)[laminas/laminas-filter

Programmatically filter and normalize data and files

9528.0M150](/packages/laminas-laminas-filter)[particle/filter

Flexible and highly usable filter library with no dependencies.

83664.6k5](/packages/particle-filter)[htmlawed/htmlawed

Official htmLawed PHP library for HTML filtering

401.1M9](/packages/htmlawed-htmlawed)[bukashk0zzz/filter-bundle

Symfony filter bundle.

24459.9k1](/packages/bukashk0zzz-filter-bundle)[kalfheim/sanitizer

Data sanitizer for PHP with built-in Laravel support.

1423.7k](/packages/kalfheim-sanitizer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
