PHPackages                             voku/slop-scan - 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. [CLI &amp; Console](/categories/cli)
4. /
5. voku/slop-scan

ActiveProject[CLI &amp; Console](/categories/cli)

voku/slop-scan
==============

Deterministic PHP CLI for explainable slop heuristics in PHP repositories.

0.1.4(2mo ago)95MITPHP ^8.3

Since May 1Compare

[ Source](https://github.com/voku/slop-scan)[ Packagist](https://packagist.org/packages/voku/slop-scan)[ RSS](/packages/voku-slop-scan/feed)WikiDiscussions Synced 3w ago

READMEChangelog (3)Dependencies (7)Versions (28)Used By (0)

[![CI](https://github.com/voku/slop-scan/actions/workflows/ci.yml/badge.svg)](https://github.com/voku/slop-scan/actions/workflows/ci.yml)[![Latest Stable Version](https://camo.githubusercontent.com/de19d8b1eedf027198953216dceb520edca9fbae353f3f4a1daa5cb0e80d5a6d/68747470733a2f2f706f7365722e707567782e6f72672f766f6b752f736c6f702d7363616e2f762f737461626c65)](https://packagist.org/packages/voku/slop-scan)[![License](https://camo.githubusercontent.com/ee8aabe7b4dab23bd9b22d37b1df5d943c17a654c7800c4491bfb3b3d9ec4b28/68747470733a2f2f706f7365722e707567782e6f72672f766f6b752f736c6f702d7363616e2f6c6963656e7365)](https://packagist.org/packages/voku/slop-scan)[![Donate to this project using Paypal](https://camo.githubusercontent.com/0d6e4d8b50b5983a58205941b1a581b1305903393b7a39da574e3f60af3c7f5b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70617970616c2d646f6e6174652d79656c6c6f772e737667)](https://www.paypal.me/moelleken)[![Donate to this project using Patreon](https://camo.githubusercontent.com/f9e075baad95563481d35174d43ef50757281abb6bc795d0f473fad452afa030/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70617472656f6e2d646f6e6174652d79656c6c6f772e737667)](https://www.patreon.com/voku)

💩 slop-scan
===========

[](#-slop-scan)

slop-scan: Deterministic PHP CLI for finding explainable slop patterns in PHP repositories.

`slop-scan` is a static-analysis style heuristic scanner. It is **not** an authorship detector. It reports concrete findings with rule IDs, evidence, scores, and stable occurrence fingerprints so results can be reviewed, compared, and tracked over time.

This repository started from a fork of [`modem-dev/slop-scan`](https://github.com/modem-dev/slop-scan) and was rewritten in PHP with Codex so it fits PHP tooling, packaging, and CI workflows directly.

It ships with AST-backed PHP heuristics, deterministic delta identities, compact baselines, reusable scan caching, and configurable suppressions for real-world repository adoption.

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

[](#requirements)

- PHP 8.3+
- Composer

Quick start
-----------

[](#quick-start)

1. Install the latest release PHAR:

```
mkdir -p "$HOME/.local/bin"
curl -fsSL https://github.com/voku/slop-scan/releases/latest/download/slop-scan.phar -o "$HOME/.local/bin/slop-scan"
chmod +x "$HOME/.local/bin/slop-scan"
```

2. Scan the current repository:

```
"$HOME/.local/bin/slop-scan" scan .
```

3. Pick an output format that matches your workflow:

```
"$HOME/.local/bin/slop-scan" scan . --lint
"$HOME/.local/bin/slop-scan" scan . --json
"$HOME/.local/bin/slop-scan" scan . --github
"$HOME/.local/bin/slop-scan" scan . --toon
"$HOME/.local/bin/slop-scan" scan . --ndjson
```

4. Ignore generated or irrelevant paths when needed:

```
"$HOME/.local/bin/slop-scan" scan . --ignore 'vendor/**' --ignore 'tests/fixtures/**'
```

The scanner targets PHP source files such as `.php`, `.phtml`, and `.inc`, plus Markdown docs such as `.md` and `.markdown`.

If your repository keeps its config outside the scan root, point the scan at it explicitly:

```
"$HOME/.local/bin/slop-scan" scan . --config-file infra/githooks/slop-scan.config.json
```

You can also keep common scan defaults in `slop-scan.config.json` so teams do not need to repeat the same flags on every run:

```
{
  "scan": {
    "cacheFile": ".slop-scan.cache.json",
    "baselineFile": "slop-baseline.json",
    "rules": ["php.debug-output"],
    "pathFilters": ["src/**"],
    "maxFindings": 50,
    "minScore": 1.0
  }
}
```

When present, those config values act as defaults for `scan`. Explicit CLI flags still win.

What it ships with
------------------

[](#what-it-ships-with)

- Deterministic findings with stable occurrence fingerprints for review, delta comparisons, and baseline workflows.
- Built-in heuristics for PHP patterns such as empty catches, error swallowing, blanket suppressions, magic numbers, placeholder bodies, clone clusters, and type-escape hotspots, plus Markdown checks for low-signal process docs.
- Multiple output targets including text, lint, JSON, GitHub annotations, TOON, and NDJSON.
- Repo-friendly controls including path ignores, per-rule overrides, repo-level `scan` defaults, PHPStan-style `ignoreErrors`, and inline `@slop-scan-ignore` directives.
- Reusable per-file scan caching via `.slop-scan.cache.json` and a `stats` command for repository-level summaries.

More docs
---------

[](#more-docs)

- [Installation and local builds](docs/installation.md)
- [Delta comparisons and baselines](docs/delta-comparisons.md)
- [Supported files and built-in rules](docs/rules.md)
- [Configuration and suppressions](docs/configuration.md)
- [Report shape](docs/report-shape.md)
- [Development and validation](docs/development.md)
- [Contributing](CONTRIBUTING.md)

Local development quick start
-----------------------------

[](#local-development-quick-start)

Install dependencies:

```
composer install
```

Run the CLI from the repository checkout:

```
php bin/slop-scan.php scan .
```

Portable agent skills
---------------------

[](#portable-agent-skills)

This repository keeps vendor-neutral agent skills in [`.ai/skills/manifest.yaml`](.ai/skills/manifest.yaml).

Those files are the repo-owned source of truth for coding agents such as Copilot, Codex, Gemini, or similar tools. Each skill is plain YAML that defines when to use it, which repository command to run, what inputs it expects, what output to prefer, and how to handle common failures.

Current portable skills:

- `scan-php-slop` for deterministic PHP repository scans
- `validate-slop-scan-repo` for scan-readiness checks and slop-scan troubleshooting on a target PHP repository
- `interpret-slop-scan-json` for machine-readable report review

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance86

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

5

Last Release

67d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6456fe693db197c458272cb758bf78958bc7d3e787ccd59db4bf3cf41654316a?d=identicon)[voku](/maintainers/voku)

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/voku-slop-scan/health.svg)

```
[![Health](https://phpackages.com/badges/voku-slop-scan/health.svg)](https://phpackages.com/packages/voku-slop-scan)
```

###  Alternatives

[psy/psysh

An interactive shell for modern PHP.

9.8k582.3M832](/packages/psy-psysh)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[jolicode/castor

A lightweight and modern task runner. Automate everything. In PHP.

54643.3k4](/packages/jolicode-castor)[rector/rector-src

Instant Upgrade and Automated Refactoring of any PHP code

136406.3k14](/packages/rector-rector-src)[laraveldaily/filacheck

Static analysis for Filament projects - detect deprecated patterns and code issues

12175.6k1](/packages/laraveldaily-filacheck)[aeliot/todo-registrar

Register TODOs from source code in issue tracker

153.0k](/packages/aeliot-todo-registrar)

PHPackages © 2026

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