PHPackages                             silverstripe/moduleratings - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. silverstripe/moduleratings

ActiveLibrary[Testing &amp; Quality](/categories/testing)

silverstripe/moduleratings
==========================

A library to provide module code quality ratings

1.0.4(7y ago)25306[2 PRs](https://github.com/silverstripe/moduleratings/pulls)1BSD-3-ClausePHPCI failing

Since Dec 20Pushed 4y ago6 watchersCompare

[ Source](https://github.com/silverstripe/moduleratings)[ Packagist](https://packagist.org/packages/silverstripe/moduleratings)[ RSS](/packages/silverstripe-moduleratings/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (7)Versions (13)Used By (1)

SilverStripe module ratings
===========================

[](#silverstripe-module-ratings)

[![Build Status](https://camo.githubusercontent.com/6d5317173912e0b441b0bb3f1b8b71bee12e2509cd73863b83381583cbc2147f/68747470733a2f2f7472617669732d63692e6f72672f73696c7665727374726970652f6d6f64756c65726174696e67732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/silverstripe/moduleratings)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/64c0adff7af6937ee162673522b100d964b1f97b3225431387ea09c469f46f7d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73696c7665727374726970652f6d6f64756c65726174696e67732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/silverstripe/moduleratings/?branch=master)[![codecov](https://camo.githubusercontent.com/8a641894216dbe807250fd3e2956b6202b634bea32ca0de70cc6f94fc9e6851d/68747470733a2f2f636f6465636f762e696f2f67682f73696c7665727374726970652f6d6f64756c65726174696e67732f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/silverstripe/moduleratings)

This module provides a check suite, and a set of automated checks that can be run over a SilverStripe module to determine a "quality rating".

This library can be installed into a SilverStripe 3 or 4 project that uses Composer.

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

[](#installation)

You can install this library with Composer if you want to use its public API:

```
composer require silverstripe/moduleratings

```

You can also install the [silverstripe/moduleratings-plugin](https://github.com/silverstripe/moduleratings-plugin)Composer plugin, which will provide a Composer command you can run locally to check module quality ratings. Please see the readme in that module for more information on using it.

Requirements
------------

[](#requirements)

- [symfony/finder](https://symfony.com/doc/current/components/finder.html) 3 or 4
- [symfony/yaml](https://symfony.com/doc/current/components/yaml.html) 3 or 4

**Note:** If you have conflicts with any of the symfony components (if using the Composer plugin) during installation, you may need to manually require an older version of one or both of those packages, e.g.:

```
composer require symfony/yaml ~3.0
composer require symfony/console ~3.0

```

Using the API
-------------

[](#using-the-api)

To create a check suite, use the `SilverStripe\ModuleRatings\CheckSuite` class. You will need to provide the directory path to the module code you want to check, and optionally the GitHub repository slug for the module (note: only GitHub supported at this stage). Providing the repository slug will enable checks that look at external continuous integration system APIs to determine quality metrics (e.g. Travis, Scrutinizer).

```
$checkSuite = new \SilverStripe\ModuleRatings\CheckSuite();

$checkSuite
    ->setModuleRoot('/path/to/silverstripe/framework')
    ->setRepositorySlug('silverstripe/silverstripe-framework');

$checkSuite->run();

echo 'Framework has scored ' . $checkSuite->getScore() . ' out of 100 points. Details:', PHP_EOL;
print_r($checkSuite->getCheckDetails());
```

The return data from `CheckSuite::getCheckDetails` is an array with the following example structure (note that example is JSON encoded):

```
{
  "good_code_coverage": {
    "description": "Has a \"good\" level of code coverage (greater than 40%, requires slug)",
    "points": 5,
    "maximum": 5
  },
  "has_code_of_conduct_file": {
    "description": "Has a code of conduct file",
    "points": 2,
    "maximum": 2
  },
  "coding_standards": {
    "description": "The PHP code in this module passes the SilverStripe lint rules (mostly PSR-2)",
    "points": 0,
    "maximum": 10
  }
 }
```

Available checks
----------------

[](#available-checks)

- "Good" code coverage (&gt;= 40%) (via either Scrutinizer CI or Codecov.io)
- "Great" code coverage (&gt;= 75%) (via either Scrutinizer CI or Codecov.io)
- PHP code is in either "code" or "src" folder
- PHP code passes a [PSR-2](www.php-fig.org/psr/psr-2/)-ish linting standards check (phpcs.xml.dist is stored in `src/Check/CodingStandardCheck` for reference)
- Contributing guide file exists
- Has documentation
- [EditorConfig](http://editorconfig.org/) configuration file exists
- [.gitattributes](https://git-scm.com/docs/gitattributes) file exists
- A license file exists
- The repository has a readme
- [Scrutinizer CI](https://scrutinizer-ci.com) is configured and has a "good" quality rating (&gt;= 6.5/10)
- One of either [Travis CI](https://travis-ci.org) or [CircleCI](https://circieci.com) is configured and the last build passed successfully

The registered checks are defined in `config.yml` along with the number of points awarded for each check given that it passes.

### Caveats

[](#caveats)

Please note the following caveats/gotchas/todos:

- Code repositories must exist on GitHub for external API checks to work

Thanks!
-------

[](#thanks)

A huge thank you to [Chris Pitt](https://github.com/assertchris) who originally wrote Helpful Robot, the inspiration for this library.

The checks in this library are heavily inspired by the original Helpful Robot checks, and are designed to match the [SilverStripe commercially supported module standard](https://www.silverstripe.org/software/addons/supported-modules-definition/).

Without Helpful Robot the SilverStripe community would look a lot less tidy today!

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 89.8% 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 ~37 days

Recently: every ~66 days

Total

12

Last Release

2660d ago

Major Versions

0.5.0 → 1.0.02018-05-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/b0cba8b534e20e6ab4fff555a97b237a18436ebca1446fc0b29c8a8b504038b9?d=identicon)[GuySartorelli](/maintainers/GuySartorelli)

![](https://avatars.githubusercontent.com/u/111025?v=4)[Ingo Schommer](/maintainers/chillu)[@chillu](https://github.com/chillu)

![](https://www.gravatar.com/avatar/a25bc04c5720a36869d5a39c6449dde7eb43e19b7c8e666d5f632d6a9ab440b1?d=identicon)[emteknetnz](/maintainers/emteknetnz)

![](https://www.gravatar.com/avatar/afbb3dcc9ef29c1a6eedd6addcae5fce9ab1271915a85a4c349301b71237368d?d=identicon)[silverstripe-machine01](/maintainers/silverstripe-machine01)

![](https://www.gravatar.com/avatar/be6648e60fbab6f70bfc34dd8c14259562d28a47510a934ea9c01fe98633f3c2?d=identicon)[sminnee](/maintainers/sminnee)

![](https://avatars.githubusercontent.com/u/1168676?v=4)[Maxime Rainville](/maintainers/maxime-rainville)[@maxime-rainville](https://github.com/maxime-rainville)

![](https://www.gravatar.com/avatar/df310131241d4c61c7321dd5743b80d9f2e7c057e1b587b942ceb06c5682973a?d=identicon)[Cheddam](/maintainers/Cheddam)

---

Top Contributors

[![robbieaverill](https://avatars.githubusercontent.com/u/5170590?v=4)](https://github.com/robbieaverill "robbieaverill (44 commits)")[![GuySartorelli](https://avatars.githubusercontent.com/u/36352093?v=4)](https://github.com/GuySartorelli "GuySartorelli (4 commits)")[![Firesphere](https://avatars.githubusercontent.com/u/680570?v=4)](https://github.com/Firesphere "Firesphere (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/silverstripe-moduleratings/health.svg)

```
[![Health](https://phpackages.com/badges/silverstripe-moduleratings/health.svg)](https://phpackages.com/packages/silverstripe-moduleratings)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[infection/infection

Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.

2.2k26.2M1.8k](/packages/infection-infection)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[phpbench/phpbench

PHP Benchmarking Framework

2.0k13.0M627](/packages/phpbench-phpbench)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)

PHPackages © 2026

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