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(4y ago)0481MITShellPHP &gt;=7.2

Since Feb 28Pushed 4y 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 2mo 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 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

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

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

[phpmetrics/phpmetrics

Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

2.6k14.5M299](/packages/phpmetrics-phpmetrics)[youwe/testing-suite

Contains Youwe's default testing packages for php.

13176.9k8](/packages/youwe-testing-suite)

PHPackages © 2026

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