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

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

lakshanjs/profanity-filter
==========================

A flexible profanity filter for PHP.

v1.1(1y ago)1187—0%MITPHPPHP &gt;=7.0

Since Sep 24Pushed 1y ago1 watchersCompare

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

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Profanity Filter
================

[](#profanity-filter)

A flexible PHP profanity filter that allows you to set custom bad words, replacement characters, and exclusion lists.

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

[](#installation)

You can install the package via Composer:

```
composer require lakshanjs/profanity-filter

```

Usage
-----

[](#usage)

```
require 'vendor/autoload.php';

use LakshanJS\ProfanityFilter\ProfanityFilter;

$filter = new ProfanityFilter();
$filter->setBadWords(['badword1', 'badword2']);
$filter->setReplacementChar('*');
$filteredMessage = $filter->censor("This is a badword1");
echo $filteredMessage; // Output: This is a ******
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

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.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

596d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7646f42a475b03098fb92e7dbec224cfabc712ac70950ee0b7337b361036d994?d=identicon)[lakshanjs](/maintainers/lakshanjs)

---

Top Contributors

[![lakshanjs](https://avatars.githubusercontent.com/u/7899504?v=4)](https://github.com/lakshanjs "lakshanjs (3 commits)")

### Embed Badge

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

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

###  Alternatives

[nizsheanez/yii2-asset-converter

Less, Sass, Scss and Phamlp converter for Yii2. No system requires. yii2-composer support, Less autoupdate, customizing of output directory

64167.5k6](/packages/nizsheanez-yii2-asset-converter)[jijunair/laravel-referral

Laravel package for a referral system

9223.8k](/packages/jijunair-laravel-referral)[japanese-holiday/japanese-holiday

30122.9k](/packages/japanese-holiday-japanese-holiday)[topshelfcraft/environment-label

...so you don't forget where you are.

16231.4k10](/packages/topshelfcraft-environment-label)[moc/notfound

Neos CMS package that loads a normal editable page for displaying a 404 error

18167.5k](/packages/moc-notfound)[phpinnacle/buffer

PHPinnacle binary buffer implementation

2493.7k10](/packages/phpinnacle-buffer)

PHPackages © 2026

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