module_weight_analyst
The Module Weight Analyst provides a visual diagnostic suite to audit and optimize Drupal's module load order. It prevents execution conflicts and ensures system stability.
This module solves the common "black box" problem of module execution order. In Drupal, a module's "weight" determines when its hooks and services are processed. If security or routing modules fire in the wrong sequence, it can lead to silent failures or performance bottlenecks. This tool transforms weight management from a guessing game into a data-driven process, empowering site builders to resolve complex dependency conflicts through a modern, interactive dashboard.
Features
- Integrity Dashboard: A centralized command center featuring a visual "Health Score" based on recursive dependency sequence validation.
- Dependency Auditing: Automatically flags "Early-load" risks where child modules are configured to execute before their parent dependencies.
- Conflict Prevention Logic: Built-in safeguards that prevent saving configurations known to cause circular dependencies or service container breaks.
- Strategic Filtering: Advanced UI controls to isolate modules by Origin (Core, Contrib, Custom), Execution Phase, or Conflict Status.
Installation
Install as you would any contributed Drupal module. See Installing Drupal Modules.
composer require drupal/module_weight_analystEnable the module using Drush:
drush en module_weight_analystPost-Installation
After installation, access the Analyst suite to begin auditing your site's execution stack:
- Navigate to Configuration » Development » Module Weight Analyst.
- Review the Sequence Integrity card for any modules flagged with conflicts.
- Modify weight values directly in the interactive table. Lower numbers (negative) run earlier; higher numbers run later.
- Check the "Audit" column for a ✔ Valid Sequence badge before proceeding.
- Click Apply Weights to commit changes to your site configuration.
Warning: Adjusting module weights alters core security and routing layers. Always perform weight adjustments on a local or staging environment before deploying to production.
Additional Requirements
This module requires PHP 8.1+ and Drupal Core 10 or 11. No external libraries are required.
Similar projects
- Modules Weight: A utility module for basic weight updates via a simple list.
- Module Weight Analyst differentiates itself by providing a full diagnostic ecosystem, including health scoring, dependency conflict detection, and an enterprise-grade administrative interface.
Supporting this Module
If you find this module useful, please consider reporting bugs or submitting feature requests in the issue queue. Your feedback helps ensure the health of the Drupal ecosystem!