Code Health Meter: A Quantitative and Graph-Theoretic Foundation for Automated Code Quality and Architecture Assessment
Quantifying code quality and architectural soundness remains a persistent challenge in modern software engineering. Existing tools often rely on isolated or superficial metrics, lacking architectural awareness and actionable insight. This article introduces code health meter (CHM), a fully automated, referentially transparent framework for quantitative and graph-theoretic code quality assessment. CHM statically analyzes source code and produces a 6D signature per module, capturing semantic complexity (maintainability index, Halstead volume, cyclomatic complexity), architectural structure (graph centrality, modularity), and redundancy (code duplication via Rabin–Karp fingerprinting). The framework is designed to be deterministic, explainable, and amenable to longitudinal analysis. We validate CHM on a 14,000-line JavaScript system by tracking its evolution across multiple versions. Our analysis reveals increasing architectural fragmentation, rising code duplication, and declining maintainability. These findings demonstrate CHM’s capability to surface actionable architectural insights, quantify technical debt, and support evidence-driven refactoring decisions. CHM bridges the gap between classical software metrics and architectural reasoning, offering a robust foundation for integrating automated code health monitoring into engineering workflows.
Authors
- Ben Khalfallah Hela (ORCID: https://orcid.org/0000-0003-0901-1921)
Institutions
- Centre hospitalier Robert-Ballanger (FR)
Publication Details
- Journal
- ACM Transactions on Software Engineering and Methodology
- Published
- 2025-05-30
- DOI
- https://doi.org/10.1145/3737670
- Primary Topic
- Software Engineering Research
- Type
- article
- Field-Weighted Citation Impact
- 0.00