Classic maintanability index

CachéQuality release 
CachéQuality 1.0.0
Domain 
Maintainability
Scope 
Project
File
Class

The maintanability index represents the relative ease of maintaining the code.

This model consists of a number of easily calculated metrics, and is able to easily and quickly predict the maintainability of a software product.

The maintainability index is given as a polynomial equation composed of predictor variables. Through a series of studies it has been shown that there is a strong correlation between software maintainability and predictor variables such as McCabe's Cyclomatic Complexity, Halstead Volume and Number of Lines of Code.

Method of calculation

The equation to obtain the maintainability index is:

CMI = 171 – 5.2 * ln(V) – 0.23 * CC – 16.2 * ln(LoC)

Where
    V is the Halstead volume
    CC is the cyclomatic complexity
    LoC is the lines of code

History

The maintainability index (MI) is a software maintainability model proposed by Oman and Hagemeister at the University of Idaho (1991), originally presented at the International Conference on Software Maintenance ICSM 1992 and later refined in a paper that appeared in IEEE Computer.