PHPackages                             dshumkov/profanity-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. dshumkov/profanity-filter

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

dshumkov/profanity-filter
=========================

Profanity filter based on Swearjar library

1.0.1(10y ago)264MITPHPPHP &gt;=5.5

Since Aug 5Pushed 10y ago1 watchersCompare

[ Source](https://github.com/DShumkov/profanity-filter)[ Packagist](https://packagist.org/packages/dshumkov/profanity-filter)[ RSS](/packages/dshumkov-profanity-filter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

profanity-filter
================

[](#profanity-filter)

Profanity filter based on PHP Swearjar library

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

[](#installation)

composer require dshumkov/profanity-filter

Usage
-----

[](#usage)

### Predefined dictionary

[](#predefined-dictionary)

```
$tester = new DShumkov\ProfaneFilter\Tester();

if ($tester->profane('son-of-a-bitch'))
  {
    return 'bad word detected';
  }

```

### Custom dictionary

[](#custom-dictionary)

```
$dictionary = [
	'regex'     => ['regex1', 'regex2'],
    'word'      => ['word1', 'word2'],
    'phrase'    => ['phrase one', 'phrase two']
];
$tester = new DShumkov\ProfaneFilter\Tester($dictionary);

if ($tester->profane('some string with word1') OR $tester->profane('phrase two'))
{
return 'bad word detected';
}

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

3940d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/676cee82c57036d795b658a43c81b76489efedf0ddca53b011f33f02e57aff6b?d=identicon)[DShumkov](/maintainers/DShumkov)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/dshumkov-profanity-filter/health.svg)

```
[![Health](https://phpackages.com/badges/dshumkov-profanity-filter/health.svg)](https://phpackages.com/packages/dshumkov-profanity-filter)
```

###  Alternatives

[phunkie/phunkie

Functional structures library for PHP

23036.4k7](/packages/phunkie-phunkie)[open-web-analytics/owa-php-sdk

The open source analytics framework.

213.0k](/packages/open-web-analytics-owa-php-sdk)

PHPackages © 2026

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