Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Stats Laravel Package

wnx/laravel-stats

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Developer Productivity & Observability: Enables data-driven insights into Laravel project complexity, dependencies, and codebase health—critical for scaling teams or maintaining legacy systems. Supports roadmap decisions around refactoring, modularization, or tech debt prioritization.
  • Build vs. Buy: Justifies buying this lightweight package over custom tooling for teams lacking dedicated observability tools, reducing dev time spent on metrics collection.
  • Onboarding & Documentation: Accelerates new hires by providing a "codebase health dashboard" (e.g., class/component relationships, unused code). Aligns with initiatives to improve developer onboarding velocity.
  • Performance & Maintenance: Identifies bloated services or tightly coupled components, informing architecture decisions (e.g., splitting monoliths, optimizing autoloading).
  • Security Audits: Highlights unused middleware, routes, or services that could introduce attack surfaces, supporting compliance or security-focused sprints.

When to Consider This Package

  • Adopt if:

    • Your Laravel project has >50K lines of code or >100 classes and lacks visibility into its structure.
    • You’re refactoring, migrating, or onboarding new devs and need a quick, automated audit.
    • Your team prioritizes tech debt reduction but lacks time for manual codebase analysis.
    • You need JSON/API-friendly metrics for integration with CI/CD tools (e.g., Slack alerts for "codebase bloat").
    • Your stack is Laravel 8+ (package targets modern versions).
  • Look elsewhere if:

    • You require real-time monitoring (this is a static analysis tool, not a runtime profiler).
    • Your project is small or greenfield (overhead may not justify insights).
    • You need database-specific metrics (focuses on PHP classes, not SQL queries).
    • Your team already uses dedicated tools like PHPStan, Psalm, or Laravel Debugbar for similar insights.
    • You’re constrained by CI/CD budget (package is dev-only; runs locally).

How to Pitch It (Stakeholders)

For Executives:

*"This package gives us a ‘health score’ for our Laravel codebase—like a CT scan for technical debt. For $0 cost, we’ll automatically detect:

  • Unused code (saving dev time on maintenance).
  • Component sprawl (helping us modularize before it becomes unmanageable).
  • Risk areas (e.g., monolithic services that could break deployments). We can run this weekly in CI to flag regressions, or use it to justify refactoring sprints. It’s like hiring a junior dev to audit the codebase, but for free."*

Ask: "Would you prioritize a 2-hour spike to integrate this into our onboarding docs or CI pipeline?"


For Engineering:

*"This is a zero-config way to get:

  • Class/component dependency maps (visualize how changes ripple).
  • JSON output for custom dashboards (e.g., ‘Classes Added vs. Removed’ over time).
  • Artisan integration—just run php artisan stats to find:
    • Orphaned routes/middleware.
    • Classes with no tests (if paired with Pest/PHPUnit).
    • Service containers with 50+ bindings (a red flag for complexity).

Proposal:

  1. Add to composer.json as a dev dependency.
  2. Run php artisan stats pre-refactor to baseline metrics.
  3. Integrate --json output into our CI for trend tracking.

Tradeoff: Minimal runtime cost (~1–2s per run), but huge payoff for legacy projects or scaling teams."*

Ask: "Should we surface the ‘top 5 most coupled components’ in our next architecture doc?"

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
sentix/ai-chatbot
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky