PHPackages                             stratum-tech/module-dev-healthcheck - 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. stratum-tech/module-dev-healthcheck

ActiveMagento2-module[CLI &amp; Console](/categories/cli)

stratum-tech/module-dev-healthcheck
===================================

CLI health check command for Magento 2 — environment, deployment, and configuration diagnostics

1.0.0(3mo ago)00MITPHPPHP &gt;=8.2CI passing

Since Mar 24Pushed 3mo agoCompare

[ Source](https://github.com/Stratum-Tech/DevHealthCheck)[ Packagist](https://packagist.org/packages/stratum-tech/module-dev-healthcheck)[ RSS](/packages/stratum-tech-module-dev-healthcheck/feed)WikiDiscussions main Synced 4w ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

Stratum DevHealthCheck
======================

[](#stratum-devhealthcheck)

A Magento 2 CLI module that runs a colour-coded, sectioned health check of your environment and deployment configuration, and scores overall system health on a 0–100 scale.

```
╔════════════════════════════════════════╗
║   Magento Environment Health Check    ║
╚════════════════════════════════════════╝

[PHP]
    ✓  PHP Version          8.3.4
    ✓  PHP Extensions       all required extensions loaded
    –  OPcache              opcache_get_configuration() not available (CLI SAPI restriction)

[Deploy & Mode]
    ✓  Deploy Mode          production
    ✓  Maintenance Mode     disabled
    ✓  Static Assets        12 locale/theme directories deployed
    ✓  Generated Code       present and non-empty

[Filesystem]
    ✓  Writable Directories  var, pub/media, pub/static, generated
    ⚠  env.php Permissions   permissions 644 — world-readable
    ✓  Disk Space            48.2GB free of 500.0GB (96%)

[Database]
    ✓  DB Connection         connected
    ✓  DB Version            MySQL 8.0.36
    ✓  Pending Upgrades      all modules up to date

[Cache]
    ✓  Cache Types           all 12 types enabled
    ✓  Cache Backend         Redis (Cm_Cache_Backend_Redis)
    ✓  Redis Connectivity    connected to 127.0.0.1:6379

[Indexers]
    ✓  Indexer Status        all 11 indexers valid
    –  Indexer Mode          mode check only relevant in production

[Environment]
    ✓  Crypt Key             present
    ⚠  Base URL              http://localhost/
    ⚠  Admin URL             /backend
    –  Cookie Security       cookie security check only relevant in production
    –  HTTPS Redirect        HTTPS check only relevant in production

[Cron]
    ✓  Cron Last Run         last run 2 minutes ago
    ✓  Cron Error Jobs       no errors in last 60 minutes
    ✓  Cron Backlog          0 stale pending jobs
    ✓  Stuck Cron Jobs       no stuck jobs detected
    ✓  Duplicate Cron Entries no duplicate scheduled entries

[Search]
    ✓  Search Engine         elasticsearch8
    ✓  Search Connectivity   connected to 127.0.0.1:9200 (elasticsearch8)

[Security]
    ✓  .git in Webroot       .git/ not inside pub/
    ✓  PHP Info Files        no phpinfo files found in pub/
    ✗  Two-Factor Auth       Magento_TwoFactorAuth is disabled
    –  Webroot Location      document root not available from CLI
    ✓  Log Dir Exposure      var/log and var/report outside pub/

[Performance]
    –  Asset Minification    minification check only relevant in production
    ⚠  Flat Catalog          flat tables disabled for: products, categories
    ✓  Module Count          142 enabled modules
    ✓  MySQL Query Cache      query cache removed in MySQL 8 (no action needed)
    ✓  Full Page Cache       Varnish

[Logging]
    ✓  Exception Log         0.1MB — last modified 142 minutes ago
    ✓  Error Reports         0 error report files
    –  Debug Logging         log level check only relevant in production

[Storage]
    ✓  Media Size            2.4GB
    ✓  Var Directory Size    0.8GB

[Config Integrity]
    ✓  config.php Sync       all 142 modules present in config.php
    ✓  Store Code in URL     disabled

[Extensions]
    ✓  Class Rewrites        8  rewrites
    ✓  Duplicate Modules     no identity conflicts between app/code/ and vendor/

[Infrastructure]
    ✓  RequireJS Config      24 RequireJS config file(s) deployed
    ✓  Session Backend       Redis

────────────────────────────────────────────
  Summary:  35 OK  |  4 WARN  |  1 FAIL  |  7 SKIP
  Score:    82/100  Grade: B
────────────────────────────────────────────

```

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

[](#requirements)

- Magento 2.4.x
- PHP 8.2+

Installation
------------

[](#installation)

**Via Composer:**

```
composer require stratum-tech/module-dev-healthcheck
bin/magento module:enable Stratum_DevHealthCheck
bin/magento setup:upgrade
```

**Manual:**

```
# Copy to app/code/Stratum/DevHealthCheck, then:
bin/magento module:enable Stratum_DevHealthCheck
bin/magento setup:upgrade
```

Usage
-----

[](#usage)

```
# Run all checks
bin/magento dev:healthcheck

# Run a single section
bin/magento dev:healthcheck --section="Security"

# Show detail messages (verbose)
bin/magento dev:healthcheck -v

# JSON output
bin/magento dev:healthcheck --format=json

# Exit with code 2 if any WARNs exist (useful in CI)
bin/magento dev:healthcheck --fail-on-warn
```

### Exit codes

[](#exit-codes)

CodeMeaning`0`All checks passed (OK / INFO / SKIP)`1`One or more FAIL results`2`One or more WARN results (only with `--fail-on-warn`)Scoring
-------

[](#scoring)

Every check contributes to a weighted 0–100 health score. Sections have different weights based on their impact on production stability and security:

SectionWeightSecurity20Database15Cache10Cron10Deploy &amp; Mode8PHP8Environment7Filesystem7Indexers5Search5Infrastructure5Performance4Logging3Config Integrity3Extensions3Storage2Points are split equally among checks within each section. SKIP checks are excluded entirely and do not affect the score. WARN results earn 50% of their available points; FAIL earns 0%.

GradeScoreA90–100B75–89C60–74D45–59F0–44Checks
------

[](#checks)

SectionCheckWhat it verifiesPHPPHP Version&gt;= 8.3 OK, 8.2 WARNPHPPHP Extensionsintl, soap, bcmath, gd/imagick, pdo\_mysql, mbstring, openssl, zip, ctype, curlPHPOPcacheEnabled, memory &gt;= 128MB, validate\_timestamps off in productionDeploy &amp; ModeDeploy Modeproduction / developer / defaultDeploy &amp; ModeMaintenance ModeOn or offDeploy &amp; ModeStatic Assetspub/static populated; skipped in developer modeDeploy &amp; ModeGenerated Codegenerated/code non-empty; skipped in developer modeFilesystemWritable Directoriesvar/, pub/media/, pub/static/, generated/Filesystemenv.php PermissionsWarns if world-readable (&gt; 0644)FilesystemDisk SpaceWARN &lt; 10% free, FAIL &lt; 2%DatabaseDB ConnectionSELECT 1DatabaseDB VersionWarns on MySQL &lt; 8.0DatabasePending UpgradesCompares setup\_module table against installed module versionsCacheCache TypesLists any disabled cache typesCacheCache BackendReports backend; warns if not RedisCacheRedis ConnectivitySocket connect with 2s timeout; skipped if not configuredIndexersIndexer StatusReports any invalid indexersIndexersIndexer ModeWarns on realtime indexers in productionEnvironmentCrypt Keycrypt/key present in env.phpEnvironmentBase URLWarns on localhost/127.0.0.1 in productionEnvironmentAdmin URLWarns on well-known default paths (admin, backend, etc.)EnvironmentCookie SecurityHttpOnly and Secure flags in productionEnvironmentHTTPS Redirectuse\_in\_frontend and use\_in\_adminhtml in productionCronCron Last RunFAIL if no successful job in last 15 minutesCronCron Error JobsCounts error status jobs in last 60 minutesCronCron BacklogWARN &gt;= 10 stale pending jobs, FAIL &gt;= 50CronStuck Cron JobsFAIL if any job stuck in "running" state for &gt; 30 minutesCronDuplicate Cron EntriesWARN if multiple pending entries for same job at same timeSearchSearch EngineReports configured engine; warns on deprecated MySQL searchSearchSearch ConnectivityHTTP connect to engine host:port with 2s timeoutSecurity.git in WebrootFAIL if .git/ directory found inside pub/SecurityPHP Info FilesFAIL if info.php or phpinfo.php found in pub/SecurityTwo-Factor AuthFAIL if Magento\_TwoFactorAuth disabled; WARN if no provider configuredSecurityWebroot LocationVerifies pub/index.php exists and sensitive files are outside pub/; skipped from CLISecurityLog Dir ExposureVerifies var/log/ and var/report/ are outside pub/ and protected by .htaccessPerformanceAsset MinificationJS/CSS minification and merging enabled in productionPerformanceFlat CatalogFlat product and category tables enabledPerformanceModule CountWARN &gt;= 300 modules, FAIL &gt;= 400PerformanceMySQL Query CacheWarns if query\_cache enabled (harmful under load)PerformanceFull Page CacheVarnish OK, built-in WARN in production, unconfigured FAILLoggingException LogWARN if recently modified or &gt; 10MB; FAIL if &gt; 50MBLoggingError ReportsWARN &gt;= 10 files in var/report/, FAIL &gt;= 100LoggingDebug LoggingWarns if dev/debug/debug\_logging enabled in productionStorageMedia SizeWARN &gt;= 20GB, FAIL &gt;= 50GBStorageVar Directory SizeWARN &gt;= 5GB, FAIL &gt;= 20GBConfig Integrityconfig.php SyncDetects modules registered but absent from config.php; run `app:config:dump` to fixConfig IntegrityStore Code in URLWarns if web/url/use\_store enabled (breaks Varnish/CDN)ExtensionsClass RewritesCounts `` entries across all di.xml; WARN &gt;= 20, FAIL &gt;= 50ExtensionsDuplicate ModulesFAIL if same module name exists in both app/code/ and vendor/InfrastructureRequireJS ConfigFAIL if pub/static/\_requirejs missing in productionInfrastructureSession BackendWARN if using file-based sessionsAdding a custom check
---------------------

[](#adding-a-custom-check)

1. Create a class implementing `Stratum\DevHealthCheck\Model\Check\CheckInterface`
2. Register it in your module's `di.xml`:

```

            Vendor\Module\Model\Check\MyCheck

```

License
-------

[](#license)

MIT — see [LICENSE](LICENSE)

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance82

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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

Unknown

Total

1

Last Release

98d ago

### Community

Maintainers

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

---

Top Contributors

[![dmcdaniel12](https://avatars.githubusercontent.com/u/1303909?v=4)](https://github.com/dmcdaniel12 "dmcdaniel12 (13 commits)")

### Embed Badge

![Health badge](/badges/stratum-tech-module-dev-healthcheck/health.svg)

```
[![Health](https://phpackages.com/badges/stratum-tech-module-dev-healthcheck/health.svg)](https://phpackages.com/packages/stratum-tech-module-dev-healthcheck)
```

###  Alternatives

[fastly/magento2

Fastly CDN Module for Magento 2.4.x

1564.4M1](/packages/fastly-magento2)[avstudnitz/disable-modules

Adds a console command to show all modules which can be safely disabled as they have no declared dependencies

10274.5k](/packages/avstudnitz-disable-modules)[yireo/magento2-theme-commands

CLI commands to manipulate themes

1337.7k1](/packages/yireo-magento2-theme-commands)[loki/magento2-components

Core module for defining Alpine.js components with advanced AJAX features

1010.0k22](/packages/loki-magento2-components)

PHPackages © 2026

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