PHPackages                             webiik/cli-analyse - 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. webiik/cli-analyse

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

webiik/cli-analyse
==================

The simple CLI tool that helps you to analyze code quality.

1.1(5y ago)0481MITShellPHP &gt;=7.2

Since Feb 28Pushed 5y ago1 watchersCompare

[ Source](https://github.com/webiik/cli-analyse)[ Packagist](https://packagist.org/packages/webiik/cli-analyse)[ Docs](https://www.webiik.com)[ RSS](/packages/webiik-cli-analyse/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (4)Versions (3)Used By (1)

[![](https://camo.githubusercontent.com/a397347ee4fb199934fee6354504f4702b89f5c22f0ce0ba94c5ff691cde545c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f77656269696b2f77656269696b2e737667)](https://camo.githubusercontent.com/a397347ee4fb199934fee6354504f4702b89f5c22f0ce0ba94c5ff691cde545c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f77656269696b2f77656269696b2e737667)[![](https://camo.githubusercontent.com/c0f4bb4767cef874cfabe7b35642509e40668ce715e65e4e073c78fff8c6d99c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646570656e64656e636965732d352d6f72616e67652e737667)](https://camo.githubusercontent.com/c0f4bb4767cef874cfabe7b35642509e40668ce715e65e4e073c78fff8c6d99c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646570656e64656e636965732d352d6f72616e67652e737667)

Analyse
=======

[](#analyse)

This CLI tool analyses code using preconfigured PHPCS, PHPMD, PHPSTAN, PHPmetrics and SonarCloud. It can help you to write better code and find possible errors.

> It's very likely that this tool will find "bugs" in your code. Always investigate these "bugs" and consider a fix. Avoid over-optimization of code, always keep in mind readability and testability.

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

[](#installation)

```
composer require --dev webiik/cli-analyse
```

Usage
-----

[](#usage)

### analyse

[](#analyse-1)

```
analyse source-dir output-dir
```

**analyse** runs code analyses over the source directory and outputs analyses results to the output directory.

```
bash analyse /private/app/ /private/tmp/analysis/app/
```

Settings
--------

[](#settings)

In brief, command **analyse** tests code for the PSR-2 standards and PHP strict types. It uses the following settings:

```
phpmd [source_dir] html cleancode,codesize,design,naming,unusedcode --reportfile [output_dir]/phpmd/index.html
```

```
phpcs --standard=PSR2 --report-full=[output_dir]/phpcs/report-full.txt --report-code=[output_dir]/phpcs/report-code.txt [source_dir]
```

```
phpstan analyse [source_dir] -l 7 --no-ansi --no-progress | awk '{$1=$1;print}' > [output_dir]/phpstan/result.txt
```

```
phpmetrics --report-html=[output_dir]/phpmetrics [source_dir]
```

```
sonar-scanner \
-Dsonar.projectKey=[sonar project key] \
-Dsonar.organization=[sonar organization] \
-Dsonar.projectBaseDir=[source_dir] \
-Dsonar.sources=. \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.login=[sonar login]
```

Resources
---------

[](#resources)

- [Webiik framework](https://github.com/webiik/webiik)
- [Report issue](https://github.com/webiik/components/issues)

###  Health Score

26

—

LowBetter than 40% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 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 ~854 days

Total

2

Last Release

1869d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1226362d003d186b45e7dfa44489c36af37196c6a1b476206700eaf4e9c96a5a?d=identicon)[Jiri Mihal](/maintainers/Jiri%20Mihal)

---

Top Contributors

[![Jiri-Mihal](https://avatars.githubusercontent.com/u/10408123?v=4)](https://github.com/Jiri-Mihal "Jiri-Mihal (18 commits)")

---

Tags

codequalityanalysisanalyse

### Embed Badge

![Health badge](/badges/webiik-cli-analyse/health.svg)

```
[![Health](https://phpackages.com/badges/webiik-cli-analyse/health.svg)](https://phpackages.com/packages/webiik-cli-analyse)
```

###  Alternatives

[phpstan/phpstan-doctrine

Doctrine extensions for PHPStan

67475.0M1.5k](/packages/phpstan-phpstan-doctrine)[youwe/testing-suite

Contains Youwe's default testing packages for php.

13195.6k8](/packages/youwe-testing-suite)[shipmonk/dead-code-detector

Dead code detector to find unused PHP code via PHPStan extension. Can automatically remove dead PHP code. Supports libraries like Symfony, Doctrine, PHPUnit etc. Detects dead cycles. Can detect dead code that is tested.

5014.2M110](/packages/shipmonk-dead-code-detector)[ec-europa/toolkit

Toolkit packaged for Drupal projects based on Robo.

39255.4k37](/packages/ec-europa-toolkit)[orrison/meliorstan

Provides PHPStan rules for improved code quality by detecting code smells and possible issues. In addition to enforcing particular naming and code style conventions to reduce bike-shedding.

1920.1k6](/packages/orrison-meliorstan)

PHPackages © 2026

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