Drupal Core Dashboard Reveals Sharp Decline in Code Complexity Across Major Versions
Drupal's codebase has undergone substantial improvements in quality and maintainability, as shown by a newly launched dashboard tracking core metrics across versions 7 to 11.
The dashboard, created by Dries Buytaert, uses static analysis to evaluate key indicators of software health, including lines of code, cyclomatic complexity, maintainability index, anti-pattern frequency, and API surface area. It offers a longitudinal view of how Drupal Core has evolved, reinforcing the project's commitment to quality and modern software practices.
Available at https://dbuytaert.github.io/drupal-core-metrics/, the dashboard is automatically updated and publicly accessible. It reveals notable progress: less complex code, better test coverage with nearly twice as much test code as production code, and a significant shift from procedural to object-oriented patterns. Global functions have largely been replaced by services, plugins, and class-based structures.
Dries emphasized the role of visibility in decision-making. “When we refactor complex code, we can measure the impact,” he wrote. “We can set goals and track progress.” The project is open source and contributions are welcome at GitHub.
All measurements are based on static code analysis, which assesses the code as written rather than how it is experienced by developers. For future iterations, Dries hopes to include dynamic analysis to better capture developer experience, such as call stack depth or the number of files and APIs touched during a typical change.
Special thanks were extended to Nathaniel Catchpole, noted as the most active core committer over the past year, for providing critical feedback across multiple rounds.


