PHPackages                             enflow/component-spam-filter - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. enflow/component-spam-filter

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

enflow/component-spam-filter
============================

Simple PHP spam filter which checks input against a blacklist

1211PHP

Since Sep 4Pushed 6y ago2 watchersCompare

[ Source](https://github.com/enflow/component-spam-filter)[ Packagist](https://packagist.org/packages/enflow/component-spam-filter)[ RSS](/packages/enflow-component-spam-filter/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Simple PHP spam filter which checks input against a blacklist
=============================================================

[](#simple-php-spam-filter-which-checks-input-against-a-blacklist)

[![Latest Version on Packagist](https://camo.githubusercontent.com/cfe266b9bcf60cb7c929c67f20f8e65e4f64b5b62def44d3d67fcc8cad3a81bf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656e666c6f772f636f6d706f6e656e742d7370616d2d66696c7465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/enflow/component-spam-filter)[![Software License](https://camo.githubusercontent.com/ad6f570a2e431cf4db24a79ee6f306dfaf55796866807c2dded8ae4cbc862108/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d47504c332d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/4e77d704b5593fbee85d0facb32c8b437bb34a48bb963409d7a7303bc02fc80c/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f656e666c6f772d6e6c2f636f6d706f6e656e742d7370616d2d66696c7465722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/enflow-nl/component-spam-filter)[![Total Downloads](https://camo.githubusercontent.com/11597b372ae005de6411ac3239bd8552aa70f444b6ee47aa99d2d7b849b4aede/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656e666c6f772f636f6d706f6e656e742d7370616d2d66696c7465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/enflow/component-spam-filter)

The `enflow/component-spam-filter` package provides a easy way to check if a given text matches any of the [blacklists](https://github.com/enflow-nl/spam-filter-blacklists).

Component is based on [`IQAndreas/php-spam-filter`](https://github.com/IQAndreas/php-spam-filter).

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require enflow/component-spam-filter
```

Usage
-----

[](#usage)

```
use Enflow\Component\SpamFilter\SpamFilter;

$spamFilter = new SpamFilter();

$spamFilter->isPossibleSpam('fun gambling'); // true
$spamFilter->isPossibleSpam('keyword or full text without blacklisted words'); // false
```

To use a custom blacklist, specify your path in the constructor like where the \*.txt files reside:

```
use Enflow\Component\SpamFilter\SpamFilter;

$spamFilter = new SpamFilter('path/to/blacklist');
```

Blacklist updates
-----------------

[](#blacklist-updates)

Pull Requests for blacklist changes are always welcome! You can find the blacklist files on Changes on this list are automatically pulled in with every `composer update`, as this package includes the `master` version of the spam-filter-blacklists package.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Changes
-------

[](#changes)

The original package from [Andreas Renberg](https://github.com/IQAndreas) has been modified and cleanup, most notable changes:

- Added support for a PSR-4 autoloader
- Added tests
- Removed the blacklist self updater

Credits
-------

[](#credits)

- [Michel Bardelmeijer](https://github.com/mbardelmeijer)
- [Andreas Renberg](https://github.com/IQAndreas)
- [All Contributors](../../contributors)

About Enflow
------------

[](#about-enflow)

Enflow is a digital creative agency based in Alphen aan den Rijn, Netherlands. We specialize in developing web applications, mobile applications and websites. You can find more info [on our website](https://enflow.nl/en).

License
-------

[](#license)

The GNU General Public License v3.0 (GPL-3.0). Please see [License File](LICENSE.md) for more information.

###  Health Score

21

—

LowBetter than 17% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/665ee1919e7c3d12f556cb913d0012a632271f912dc9c3250b7da67d7f3f4b16?d=identicon)[enflow](/maintainers/enflow)

---

Top Contributors

[![mbardelmeijer](https://avatars.githubusercontent.com/u/1583095?v=4)](https://github.com/mbardelmeijer "mbardelmeijer (7 commits)")

### Embed Badge

![Health badge](/badges/enflow-component-spam-filter/health.svg)

```
[![Health](https://phpackages.com/badges/enflow-component-spam-filter/health.svg)](https://phpackages.com/packages/enflow-component-spam-filter)
```

PHPackages © 2026

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