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

Maintenance35

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

600d 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

[rs/laravel-version-control

Foundations for making your app version controlled. Provides migration, blueprint and base models. Will make your app GxP compliant if you exclusively use the VC models and table structure as set out in this package.

1227.5k](/packages/rs-laravel-version-control)[mad-web/laravel-seoable

Easy to map your eloquent fields to seo properties

407.6k](/packages/mad-web-laravel-seoable)

PHPackages © 2026

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