PHPackages                             siteworxpro/password-score - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. siteworxpro/password-score

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

siteworxpro/password-score
==========================

Find a passwords strength using more complex methods

1.0.0(8y ago)07.3k1[1 PRs](https://github.com/siteworxpro/password-strength-tool/pulls)MITPHP

Since Feb 16Pushed 4y agoCompare

[ Source](https://github.com/siteworxpro/password-strength-tool)[ Packagist](https://packagist.org/packages/siteworxpro/password-score)[ RSS](/packages/siteworxpro-password-score/feed)WikiDiscussions master Synced 2w ago

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

Password Strength Tester
------------------------

[](#password-strength-tester)

[![Build Status](https://camo.githubusercontent.com/8a3c4290c14792f32130ca0b1c9c050a321b632790013aed7566fbc2edf80ace/68747470733a2f2f7472617669732d63692e6f72672f73697465776f727870726f2f70617373776f72642d737472656e6774682d746f6f6c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/siteworxpro/password-strength-tool)

A simple and fast password strength tester inspired by [WolframAlpha's Calculation](https://www.wolframalpha.com/input/?i=password+strength+TestPassword)

**Usage**

```
$scorer = \Siteworx\Passwords\Scorer::score('SuperPassword!');

echo json_encode($scorer->toArray());
```

will output and is great for an ajax endpoint

```
{
  "calculatedData": {
    "length": {
      "value": 56,
      "count": 14,
      "displayName": "Length"
    },
    "upperCase": {
      "value": 13,
      "count": 2,
      "displayName": "Uppercase Letters"
    },
    "lowerCase": {
      "value": 17,
      "count": 11,
      "displayName": "Lowercase Letters"
    },
    "numbers": {
      "value": 0,
      "count": 0,
      "displayName": "Numbers"
    },
    "specialChars": {
      "value": 13,
      "count": 1,
      "displayName": "Special Characters"
    },
    "numbersOnly": {
      "value": 0,
      "count": "no",
      "displayName": "Numbers Only"
    },
    "lettersOnly": {
      "value": -10,
      "count": "yes",
      "displayName": "Letters Only"
    },
    "repeatingChars": {
      "value": -1,
      "count": 1,
      "displayName": "Repeating Characters"
    },
    "reusingChars": {
      "value": -4,
      "count": 2,
      "displayName": "Reusing Characters"
    },
    "conscUpperCase": {
      "value": -8,
      "count": 4,
      "displayName": "Consecutive Upper Case"
    },
    "conscLowerCase": {
      "value": -26,
      "count": 13,
      "displayName": "Consecutive Lower Case"
    },
    "conscNumbers": {
      "value": 0,
      "count": 0,
      "displayName": "Consecutive Numbers"
    },
    "seqLetters": {
      "value": 0,
      "count": 0,
      "displayName": "Sequential Letters"
    },
    "seqNumbers": {
      "value": 0,
      "count": 0,
      "displayName": "Sequential Numbers"
    }
  },
  "total": 50,
  "strength": {
    "text_value": "Poor",
    "int_value": 1
  }
}
```

You can also access several helper methods

```
if ($scorer->isExcellent()) {
    echo 'Your password is excellent :)';
}
if ($scorer->isPoor()) {
    echo 'Your password is poor :(';
}
```

or

```
echo 'Your Password is ' . $scorer->stringValue();
```

```
Your Password is Poor

```

**Bias**

You can also provide a bias to the scorer if you want your passwords to be scored higher or lower.

Pass in a value between -5 to 5.

```
$scorer = \Siteworx\Passwords\Scorer::score('N0wAStrongPassword!', -5);
echo 'This password is ' . $scorer->stringValue();
$scorer = \Siteworx\Passwords\Scorer::score('N0wAStrongPassword!', 0);
echo 'This password is ' . $scorer->stringValue();
$scorer = \Siteworx\Passwords\Scorer::score('N0wAStrongPassword!', 5);
echo 'This password is ' . $scorer->stringValue();
```

```
This password is Poor
This password is Fair
This password is Very Strong

```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

3056d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19206279?v=4)[alphafloor](/maintainers/alphafloor)[@alphafloor](https://github.com/alphafloor)

---

Top Contributors

[![ronrise](https://avatars.githubusercontent.com/u/29732851?v=4)](https://github.com/ronrise "ronrise (8 commits)")

### Embed Badge

![Health badge](/badges/siteworxpro-password-score/health.svg)

```
[![Health](https://phpackages.com/badges/siteworxpro-password-score/health.svg)](https://phpackages.com/packages/siteworxpro-password-score)
```

###  Alternatives

[chaoswey/taiwan-id-validator

台灣身分證、統一編號驗證

319.9k](/packages/chaoswey-taiwan-id-validator)

PHPackages © 2026

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