Go BackGo Forward Index Home    

Project
Code
Meter

Code Quality Metrics

These code metrics give an indication to some basic source code qualities that affect maintainability, reuse and peer review. ProjectCodeMeter also shows textual notices in the Quality Notes section of the Summary and the Quality Report if any of these metrics indicate a problem.

Code Quality Notes Count - Shows the number of warnings indicating quality issues. Ideally this should be 0, higher values indicate the code will be difficult to maintain.
Code to Comment Ratio (CCR) - Shows balance between Comment lines and Code Statements (LLOC), A value of 100 means there's a comment for every code line, lower means only some of the code lines have comments, while higher means that there is more than one comment for each code line. For example a value of 60 means that only 60% of the code statements have comments. notice that this is an average, so comments may not be dispersed evenly across the file.
Essential Comment Factor (ECF) - Shows balance between High Quality Comment lines and important Code Statements (Code Line). An important code statement is a statement which has a higher degree of complexity. A value of 100 means there's a high quality comment for every important code statement, lower means only some of the code lines have comments, while higher means that there is more than one comment for each code line. For example a value of 60 means that only 60% of the important code statements have high quality comments. This indication is important as it is essential that complex lines of code have comments explaining them. Notice that this is an average, so comments may not be dispersed evenly across the file.
Code Structure Modularity (CSM) - Indicates the degree to which the code is divided into classes and functions. Values around 100 indicate a good balance of code per module, lower values indicate low modularity (bulky code), and higher values indicate fragmented code.
Logic Density (LD) - Indicates how condensed the logic within the program code. Lower values mean less logic is packed into the code thus may indicate straight-forward or auto-generated code, while higher values indicate code that is more likely to be generated by a person.
Source Divergence Entropy (SDE) - Indicates the degree to which objects are manipulated by logic. higher value mean more manipulation.
Information Diversity Factor (IDF) - Indicates how much reuse is done with objects. higher value mean more reuse.
Object Convolution Factor (OCF) - Shows the degree to which objects interact with each other. higher value means more interaction, therefore more complex information flow.