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

26

—

LowBetter than 43% of packages

Maintenance38

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

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

[nunomaduro/essentials

Just better defaults for your Laravel projects.

1.2k317.5k51](/packages/nunomaduro-essentials)[snowplow/referer-parser

Snowplow Refer(r)er parser for PHP

3782.2M30](/packages/snowplow-referer-parser)[n98/junit-xml

JUnit XML Document generation library

168.7M8](/packages/n98-junit-xml)[zenstruck/bytes

Parse, manipulate, humanize, and format bytes.

25662.7k8](/packages/zenstruck-bytes)[yajra/laravel-disqus

A simple Disqus platform integration with Laravel.

8456.9k](/packages/yajra-laravel-disqus)

PHPackages © 2026

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