PHPackages                             joshcirre/laravel-doctor - 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. joshcirre/laravel-doctor

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

joshcirre/laravel-doctor
========================

Artisan-first Laravel codebase health scanner with diagnostics and scoring

v0.0.4(4mo ago)240↓82.1%MITPHPPHP ^8.2

Since Feb 18Pushed 4mo agoCompare

[ Source](https://github.com/joshcirre/laravel-doctor)[ Packagist](https://packagist.org/packages/joshcirre/laravel-doctor)[ RSS](/packages/joshcirre-laravel-doctor/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (4)Dependencies (3)Versions (5)Used By (0)

Laravel Doctor
==============

[](#laravel-doctor)

Artisan-first Laravel codebase health scanner inspired by React Doctor.

`laravel-doctor` reports actionable diagnostics across security, correctness, performance, architecture, and maintainability, then computes a local deterministic 0-100 score.

Install
-------

[](#install)

```
composer require --dev joshcirre/laravel-doctor
```

Publish config:

```
php artisan vendor:publish --tag=laravel-doctor-config
```

Usage
-----

[](#usage)

Run a full scan:

```
php artisan doctor
```

Common options:

```
php artisan doctor -v
php artisan doctor --score
php artisan doctor --format=json
php artisan doctor --diff
php artisan doctor --diff=main
php artisan doctor --min-score=75
```

Trace scanned files:

```
php artisan doctor -v      # first 60 scanned files
php artisan doctor -vv     # all scanned files
```

Progress and banner output use Laravel's console UI components by default. Disable progress indicators with:

```
php artisan doctor --no-progress
```

Auto-Fix
--------

[](#auto-fix)

Apply safe built-in automated fixes:

```
php artisan doctor:fix
```

Preview changes only:

```
php artisan doctor:fix --dry-run
```

Apply only for changed files:

```
php artisan doctor:fix --diff
```

Run an optional Rector pass after built-in fixers (when `vendor/bin/rector` exists):

```
php artisan doctor:fix --with-rector
```

When diagnostics cannot be fixed programmatically, Laravel Doctor generates `.laravel-doctor/manual-fix-plan.md` with:

- A ready-to-paste prompt for your coding agent
- A rule-by-rule checklist with file and line references

Current Rule Set (MVP)
----------------------

[](#current-rule-set-mvp)

- `laravel/no-debug-statements`
- `laravel/no-env-outside-config`
- `laravel/no-mass-assignment-bypass`
- `laravel/controller-missing-validation`
- `laravel/no-broad-catch`
- `laravel/likely-n-plus-one`
- `laravel/fat-controller`
- `laravel/deep-nesting`

Scoring
-------

[](#scoring)

- Starts at `100`
- Applies weighted penalties by severity and category
- Caps per-rule penalty to avoid one repeated issue collapsing score
- Labels:
    - `80+`: Great
    - `55-79`: Needs work
    - `0-54`: Critical

CI Example
----------

[](#ci-example)

```
php artisan doctor --format=json --min-score=75
```

The command exits non-zero when score is below `--min-score`.

Skill
-----

[](#skill)

This repository includes an Agent Skill at `skills/laravel-doctor/SKILL.md` for AI agents to run Laravel Doctor and remediate findings in priority order.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance75

Regular maintenance activity

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

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

Total

4

Last Release

136d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e649f8d73257941573d972ca3d263116738b8b4de708d54ad107e17c38522dd2?d=identicon)[joshcirre](/maintainers/joshcirre)

---

Top Contributors

[![joshcirre](https://avatars.githubusercontent.com/u/8452303?v=4)](https://github.com/joshcirre "joshcirre (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/joshcirre-laravel-doctor/health.svg)

```
[![Health](https://phpackages.com/badges/joshcirre-laravel-doctor/health.svg)](https://phpackages.com/packages/joshcirre-laravel-doctor)
```

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M203](/packages/laravel-ai)[livewire/flux

The official UI component library for Livewire.

9527.8M128](/packages/livewire-flux)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

725173.6k14](/packages/tallstackui-tallstackui)[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

198321.1k](/packages/fumeapp-modeltyper)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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