PHPackages                             mi-schi/php-code-checker - 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. mi-schi/php-code-checker

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

mi-schi/php-code-checker
========================

Execute the tests and check the php code

2.2.10(10y ago)63.7k2PythonPHP &gt;=5.6.0

Since Dec 25Pushed 10y ago1 watchersCompare

[ Source](https://github.com/mi-schi/php-code-checker)[ Packagist](https://packagist.org/packages/mi-schi/php-code-checker)[ RSS](/packages/mi-schi-php-code-checker/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (8)Versions (15)Used By (0)

php-code-checker
================

[](#php-code-checker)

[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE.md)[![Latest Stable Version](https://camo.githubusercontent.com/db38413a5b58c6d44c3333ba2e5d5a57e9049edb585c50231bbdfb51372f42d1/68747470733a2f2f706f7365722e707567782e6f72672f6d692d736368692f7068702d636f64652d636865636b65722f762f737461626c65)](https://packagist.org/packages/mi-schi/php-code-checker)[![Total Downloads](https://camo.githubusercontent.com/0bbb0811b43b1b2ada1a7051f1fd0572881e2b12d04dedf85e0596d8ffc481e8/68747470733a2f2f706f7365722e707567782e6f72672f6d692d736368692f7068702d636f64652d636865636b65722f646f776e6c6f616473)](https://packagist.org/packages/mi-schi/php-code-checker)

Features
--------

[](#features)

Check your php project code with

- [phpunit](https://github.com/sebastianbergmann/phpunit)
- lint
- [phpcpd](https://github.com/sebastianbergmann/phpcpd)
- [phpcs](https://github.com/squizlabs/PHP_CodeSniffer)
- [phpmd](https://github.com/phpmd/phpmd)
- [security-checker](https://github.com/sensiolabs/security-checker)

and create metrics with

- [phploc](https://github.com/sebastianbergmann/phploc)
- [phpmetrics](https://github.com/Halleck45/PhpMetrics)
- [pdepend](https://github.com/pdepend/pdepend)

This script is a better alternative to configure ant on your jenkins. The python script is more flexible and can also be used on your local dev machine. You can define all settings in the `composer.json` in your project, but you don't have to. The scripts also supports exclusion of multiple folders.

The scripts are tested with `Python 2.6` and `Python 3.5`.

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

[](#installation)

Via git:

```
git clone git@github.com:mi-schi/php-code-checker.git

```

Via composer:

```
composer require mi-schi/php-code-checker

```

Usage
-----

[](#usage)

Use python to execute the script in the project folder:

```
checker.py all
checker.py check
checker.py metric

```

The `all` argument executes the `check` and `metric` argument. You can set the second argument as project path:

```
checker.py all /path/to/your/project
checker.py all relative/path

```

If you want to execute tests with coverage, regardless your configuration, then use the `checker.py coverage` argument. You can update all internal dependencies with `update.py path/to/php`.

Configuration
-------------

[](#configuration)

The configuration is simple. Just look in the [default\_configuration.json](data/default_configuration.json) for usage. Add an extra property to the `composer.json` in your project and overwrite the default configuration if you want. The `php-code-checker` comes with its own dependencies for `phpunit`, `phpcs` and so on. If you want to use another `phpunit`, you can define the `bin-dir` property and add `phpunit` in your composer requirements. If `php-code-checker` find `path/to/your/project/bin/phpunit` then this binary will be used. Otherwise your tests were executed with the `phpunit` version which comes with `php-code-checker`.

Jenkins integration
-------------------

[](#jenkins-integration)

There is a huge configuration to process all these reports on Jenkins. First you have to install the following plugins:

- [Checkstyle](https://wiki.jenkins-ci.org/display/JENKINS/Checkstyle+Plugin)
- [Clover PHP](https://wiki.jenkins-ci.org/display/JENKINS/Clover+PHP+Plugin)
- [Crap4J](https://wiki.jenkins-ci.org/display/JENKINS/Crap4J+Plugin)
- [Plot](https://wiki.jenkins-ci.org/display/JENKINS/Plot+Plugin)
- [PMD](https://wiki.jenkins-ci.org/display/JENKINS/PMD+Plugin)
- [Sidebar-Link](https://wiki.jenkins-ci.org/display/JENKINS/Sidebar-Link+Plugin)
- [Violations](https://wiki.jenkins-ci.org/display/JENKINS/Violations)
- [xUnit](https://wiki.jenkins-ci.org/display/JENKINS/xUnit+Plugin)

Also useful:

- [Task Scanner](https://wiki.jenkins-ci.org/display/JENKINS/Task+Scanner+Plugin)

Then, create a new empty job called `default-job`. Copy the [default-jenkins-config.xml](data/default-jenkins-config.xml) to `/var/lib/jenkins/jobs/default-job/config.xml` on your Jenkins. That's it! Append the configuration and copy `default-job` from now on.

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

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

Every ~3 days

Total

14

Last Release

3799d ago

Major Versions

1.1.0 → 2.0.02015-12-28

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8821732?v=4)[Michael Schindler](/maintainers/mi-schi)[@mi-schi](https://github.com/mi-schi)

---

Top Contributors

[![mi-schi](https://avatars.githubusercontent.com/u/8821732?v=4)](https://github.com/mi-schi "mi-schi (9 commits)")

### Embed Badge

![Health badge](/badges/mi-schi-php-code-checker/health.svg)

```
[![Health](https://phpackages.com/badges/mi-schi-php-code-checker/health.svg)](https://phpackages.com/packages/mi-schi-php-code-checker)
```

###  Alternatives

[slevomat/coding-standard

Slevomat Coding Standard for PHP\_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.

1.5k134.0M2.2k](/packages/slevomat-coding-standard)[youwe/testing-suite

Contains Youwe's default testing packages for php.

13191.0k8](/packages/youwe-testing-suite)[jdlabails/php-project-analyzer-bundle

Symfony Bundle for PhpProjectAnalyzer

1110.8k](/packages/jdlabails-php-project-analyzer-bundle)

PHPackages © 2026

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