PHPackages                             wapmorgan/php-code-analyzer - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. wapmorgan/php-code-analyzer

ActivePackage[Utility &amp; Helpers](/categories/utility)

wapmorgan/php-code-analyzer
===========================

A program that finds usage of different non-built-in extensions in your php code.

1.0.6(7y ago)96143.2k—1.6%8[1 issues](https://github.com/wapmorgan/PhpCodeAnalyzer/issues)4BSD-3-ClausePHP

Since May 12Pushed 3y ago6 watchersCompare

[ Source](https://github.com/wapmorgan/PhpCodeAnalyzer)[ Packagist](https://packagist.org/packages/wapmorgan/php-code-analyzer)[ RSS](/packages/wapmorgan-php-code-analyzer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (1)Versions (8)Used By (4)

PhpCodeAnalyzer
===============

[](#phpcodeanalyzer)

PhpCodeAnalyzer finds usage of different non-built-in extensions in your php code. This tool helps you understand how transportable your code between php installations is.

[![Latest Stable Version](https://camo.githubusercontent.com/560c8bb664313fd26f0c7e378bfa55f9773af4859ed56f9c0c87ebdafee8e2ee/68747470733a2f2f706f7365722e707567782e6f72672f7761706d6f7267616e2f7068702d636f64652d616e616c797a65722f762f737461626c65)](https://packagist.org/packages/wapmorgan/php-code-analyzer)[![Total Downloads](https://camo.githubusercontent.com/c23014162bdf2960cfe5e28097ac33ada2e9d87d1947819c58372e80e4bf9b4c/68747470733a2f2f706f7365722e707567782e6f72672f7761706d6f7267616e2f7068702d636f64652d616e616c797a65722f646f776e6c6f616473)](https://packagist.org/packages/wapmorgan/php-code-analyzer)[![License](https://camo.githubusercontent.com/41d84818d9258a3980180e11504456ac053744a7b6021dc3591fc62156f9960d/68747470733a2f2f706f7365722e707567782e6f72672f7761706d6f7267616e2f7068702d636f64652d616e616c797a65722f6c6963656e7365)](https://packagist.org/packages/wapmorgan/php-code-analyzer)

TOC
===

[](#toc)

- [Example of usage](#example-of-usage)
- [Help](#help)
- [Installation](#installation)

Example of usage
================

[](#example-of-usage)

To scan your files or folder launch `phpca` and pass file or directory names.

```
> phpca ..\HttpServer
Scanning ..\HttpServer ...
[spl] Function "spl_autoload_register" used in file ..\HttpServer/vendor/composer/ClassLoader.php[258]
[spl] Function "spl_autoload_unregister" used in file ..\HttpServer/vendor/composer/ClassLoader.php[266]
[spl] Function "spl_autoload_register" used in file ..\HttpServer/vendor/composer/autoload_real.php[22]
[spl] Function "spl_autoload_unregister" used in file ..\HttpServer/vendor/composer/autoload_real.php[24]

Used non-built-in extensions in your code:
- [spl] Standard PHP Library (SPL). This extension is bundled with php since PHP 5.0.0. Extension is available in pecl: spl.
```

You can skip progress with `--no-progress` option:

```
> phpca --no-progress ..\yii-1.1.16.bca042\framework\caching
Scanning ..\yii-1.1.16.bca042\framework\caching ...

Used non-built-in extensions in your code:
- [apc] Alternative PHP Cache. Extension is available in pecl: apc.
- [wincache] Windows Cache for PHP. Extension is available in pecl: wincache.
```

Also, you can keep only progress with `--no-report` option:

```
> phpca --no-report ..\yii-1.1.16.bca042\framework\caching
Scanning ..\yii-1.1.16.bca042\framework\caching ...
[apc] Function "apc_fetch" used in file ..\yii-1.1.16.bca042\framework\caching/CApcCache.php[46]
[apc] Function "apc_fetch" used in file ..\yii-1.1.16.bca042\framework\caching/CApcCache.php[56]
[apc] Function "apc_store" used in file ..\yii-1.1.16.bca042\framework\caching/CApcCache.php[70]
[apc] Function "apc_add" used in file ..\yii-1.1.16.bca042\framework\caching/CApcCache.php[84]
[apc] Function "apc_delete" used in file ..\yii-1.1.16.bca042\framework\caching/CApcCache.php[95]
[apc] Function "apc_clear_cache" used in file ..\yii-1.1.16.bca042\framework\caching/CApcCache.php[107]
[apc] Function "apc_clear_cache" used in file ..\yii-1.1.16.bca042\framework\caching/CApcCache.php[109]
[wincache] Function "wincache_ucache_get" used in file ..\yii-1.1.16.bca042\framework\caching/CWinCache.php[46]
[wincache] Function "wincache_ucache_get" used in file ..\yii-1.1.16.bca042\framework\caching/CWinCache.php[56]
[wincache] Function "wincache_ucache_set" used in file ..\yii-1.1.16.bca042\framework\caching/CWinCache.php[70]
[wincache] Function "wincache_ucache_add" used in file ..\yii-1.1.16.bca042\framework\caching/CWinCache.php[84]
[wincache] Function "wincache_ucache_delete" used in file ..\yii-1.1.16.bca042\framework\caching/CWinCache.php[95]
[wincache] Function "wincache_ucache_clear" used in file ..\yii-1.1.16.bca042\framework\caching/CWinCache.php[106]
```

If you want to see only usage of one specific extension, use `--extension=` option:

```
> phpca --extension=apc ..\yii-1.1.16.bca042\framework\caching
Scanning ..\yii-1.1.16.bca042\framework\caching ...
[apc] Function "apc_fetch" used in file ..\yii-1.1.16.bca042\framework\caching/CApcCache.php[46]
[apc] Function "apc_fetch" used in file ..\yii-1.1.16.bca042\framework\caching/CApcCache.php[56]
[apc] Function "apc_store" used in file ..\yii-1.1.16.bca042\framework\caching/CApcCache.php[70]
[apc] Function "apc_add" used in file ..\yii-1.1.16.bca042\framework\caching/CApcCache.php[84]
[apc] Function "apc_delete" used in file ..\yii-1.1.16.bca042\framework\caching/CApcCache.php[95]
[apc] Function "apc_clear_cache" used in file ..\yii-1.1.16.bca042\framework\caching/CApcCache.php[107]
[apc] Function "apc_clear_cache" used in file ..\yii-1.1.16.bca042\framework\caching/CApcCache.php[109]
```

Summary report in this case will not be added at the end.

Help
====

[](#help)

Full list of available options:

```
> phpca -h
PhpCodeAnalyzer
Usage:
    phpca [-v] [-q] [--output=] [--no-report] [--no-progress] [--since-version=] FILES...
    phpca [-v] [-q] [--output=] --extension= FILES...
    phpca -h

Options:
  -h --help                 Show this text
  -v --verbose              Show more debug text
  -q --quiet                Don't print any messages
  --output=           Path where to generate XML report
  --extension=         Look for usage a specific extension
  --no-report               Turn off summary report
  --no-progress             Turn off progress
  --since-version= Only include extensions not included since version
```

Installation
============

[](#installation)

Phar
----

[](#phar)

1. Just download a phar from [releases page](https://github.com/wapmorgan/PhpCodeAnalyzer/releases) and make executable

```
chmod +x phpca.phar
```

2. a. **Local installation**: use it from current folder:

    ```
    ./phpca.phar -h
    ```

    b. **Global installation**: move it in to one of folders listed in your `$PATH` and run from any folder:

    ```
    sudo mv phpca.phar /usr/local/bin/phpca
    phpca -h
    ```

Composer
--------

[](#composer)

Another way to install **phpca** is via composer.

1. Install composer:

```
curl -sS https://getcomposer.org/installer | php
```

2. Install phpcf in global composer dir:

```
./composer.phar global require wapmorgan/php-code-analyzer dev-master
```

3. Run from any folder:

```
phpca -h
```

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity46

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 78% 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 ~243 days

Recently: every ~205 days

Total

7

Last Release

2566d ago

### Community

Maintainers

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

---

Top Contributors

[![wapmorgan](https://avatars.githubusercontent.com/u/6000618?v=4)](https://github.com/wapmorgan "wapmorgan (32 commits)")[![leemason](https://avatars.githubusercontent.com/u/1238646?v=4)](https://github.com/leemason "leemason (3 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (2 commits)")[![kuzmichus](https://avatars.githubusercontent.com/u/430747?v=4)](https://github.com/kuzmichus "kuzmichus (2 commits)")[![MacFJA](https://avatars.githubusercontent.com/u/1475671?v=4)](https://github.com/MacFJA "MacFJA (1 commits)")[![phaldan](https://avatars.githubusercontent.com/u/5508270?v=4)](https://github.com/phaldan "phaldan (1 commits)")

---

Tags

code-analysisphp-specificprogrammer-toolstatic-analysiscode analysiscommand-line utility

### Embed Badge

![Health badge](/badges/wapmorgan-php-code-analyzer/health.svg)

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

###  Alternatives

[salehhashemi/laravel-intelli-git

An intelligent Git helper package for Laravel applications. It utilizes OpenAI's GPT to analyze your Git repository, providing features such as automatic generation of commit messages based on staged changes.

131.5k](/packages/salehhashemi-laravel-intelli-git)

PHPackages © 2026

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