Metrics list, sorted

AHEFAttribute hiding effectiveness factorClasses that do access attributes / Classes that can access attributes.
AHFAttribute hiding factorMeasures how class attributes (variables) are hidden from other classes.
AIFAttribute inheritance factorThe sum of inherited variables divided by the total number of variables in a project.
CALLDENSCall densityAverage number of calls on a code line. Measures the modularity or structuredness. CALLDENS=CALLS/LLOC
CALLSNumber of procedure callsNumber of procedure call statements, including calls to subs, functions and declares, accesses to properties and the raising of events. Implicit calls (such as Form_Load) are not counted.
CBOCoupling between Object ClassesNumber of classes to which a class is coupled. Coupling is defined as method call or variable access.
CCCyclomatic complexityMcCabe cyclomatic complexity equals the number of execution paths through a procedure. Also known as V(C).
CC2Cyclomatic complexity with BooleansCC2 equals the regular CC metric but each Boolean operator within a branching statement causes complexity to increase by one. Also called Extended cyclomatic complexity (ECC).
CC3Cyclomatic complexity without CasesCC3 equals the regular CC metric, but each Select Case block is counted as one branch, not as multiple branches.
CFCoupling factorMeasures the actual couplings among classes in relation to the maximum number of possible couplings. Also known as COF.
CISClass interface sizeSize of class interface measured by number of non-private methods and variables. CIS=WMCnp + VARSnp
CLSNumber of classesNumber of classes defined in project.
CLSaNumber of abstract classesNumber of abstract classes defined in project. In VB.NET, an abstract class is declared MustOverride. In VB Classic, it's a skeleton class that defines an interface class for Implements.
CLScNumber of concrete classesNumber of concrete classes defined in project. A concrete class is one that is not abstract (see CLSa). CLSc=CLS-CLSa
CONSTSNumber of constsNumber of constants, excluding enum constants.
CSZClass sizeSize of class measured by number of methods and variables. CSZ=WMC + VARS
CTORSConstructorsConstructors defined by class. VB.NET Sub New is a constructor, whereas VB Classic Class_Initialize is an event.
CTRLControl densityControl density measures the amount of control statements. It equals the number of control statements divided by the number of all executable statements. CTRL=STMTc/STMTx
DATADENSData access densityAverage number of variable access instructions per logical line of code. DATADENS=TRW/LLOC
DATEProject dateDate of newest file in project.
DATEFFile dateFile date.
DATEFAverage file dateAverage file date.
DAYSDays passedDays passed between versions.
DCData complexityMeasures the internal complexity of a procedure. Calculated by dividing the number of input/output variables by SFOUT+1. Defined by Card & Agresti, also known as D(i). Used to calculate SYSC. DC=IOVariables/(SFOUT+1)
DCALLTDepth of call treeMaximum number of nested procedure calls from a procedure. Recursive calls are not counted.
DCONDDepth of conditional nestingMaximum number of nested conditional statements in a procedure.
dCONSTSNumber of dead constsNumber of unused constants.
DEADDeadness indexEvaluates the average percentage of dead code. DEAD=(dPROCS + dVARS + dCONSTS) / (PROCS + VARS + CONSTS)
DECDENSDecision densityIndicates the density of decision statements in the code. Calculated as sum of procedural cyclomatic complexity divided by logical lines of code. DECDENS=Sum(CC)/LLOC
dENUMCSNumber of dead Enum constantsNumber of unused enumeration constants.
dENUMSNumber of dead EnumsNumber of unused enumeration names.
DITDepth of Inheritance TreeNumber of ancestor classes.
dLINESDead linesPhysical lines in dead procedures.
DLOOPDepth of loopingMaximum number of nested loop statements in a procedure.
dPROCSNumber of dead proceduresNumber of unused procedures.
dUDTSNumber of dead user-defined typesNumber of unused user-defined types, that is, Type and/or Structure blocks.
dVARSNumber of dead variablesNumber of unused variables.
ENUMCSNumber of Enum constantsNumber of enumeration constant names.
ENUMREnum ratioThe percentage of Enum constants among all constants. ENUMR=ENUMCS/(ENUMCS+CONSTS)
ENUMSNumber of EnumsNumber of enumeration names.
ENUMSZAverage Enum sizeAverage number of constants in an Enum block. ENUMSZ=ENUMCS/ENUMS
EVENTSEventsEvents defined by class. This metric counts the event definitions, not event handlers.
FILESNumber of filesNumber of files in project.
FLOWSData flowsNumber of data flows into and out of a variable. FLOWS=READS*WRITES
FORMSNumber of formsNumber of real forms excluding any UserControls.
IC1Informational complexityFan-in multiplied by fan-out multiplied by procedure length (logical lines of code). IC1=IFIO*LLOC
IFINInformational fan-inAmount of data read. Procedures called + parameters read + global variables read.
IFIOInformational fan-in x fan-outFan-in multiplied by fan-out. IFIO=IFIN*IFOUT
IFOUTInformational fan-outAmount of data written. Procedures that call this procedure + ByRef parameters written to + global variables written to.
IIFInternal inheritance factorThe relative amount of internal inheritance. Internal inheritance happens when a class inherits another class in the same system (not an external class).
IMPLImplemented interfacesNumber of interfaces implemented by class.
INTERFSNumber of Interface definitionsNumber of Interfaces defined in project.
IOgGlobal I/ONumber of global and module-level variables accessed by a procedure.
IOg%Global I/O ratioAmount of data flow via global and module-level variables versus procedure parameters and function return values. IOg%=Sum(IOg) / Sum(IOg+IOp)
IOpParameter I/ONumber of parameters used or returned by a procedure. The function return value counts as one parameter (output parameter).
IOvarsInput and output variablesTotal number of input and output variables for a procedure, including parameters and function return value. IOvars=IOg+IOp
kBFile sizeFile size in kilobytes.
kBProject sizeProject size in kilobytes. Includes all source files included in the analysis, excluding referenced files.
LCCiLoose Class CohesionLCCi is 'LCC with inheritance'. LCC describes the connectedness of the methods in a class. LCC<1 indicates a non-cohesive class. LCC=1 indicates a cohesive class."
LCClLoose Class Cohesion (local)LCCl is 'LCC without inheritance'. LCC describes the connectedness of the methods in a class. LCC<1 indicates a non-cohesive class. LCC=1 indicates a cohesive class."
LCOM1Lack of Cohesion of Methods (1)A zero value indicates a cohesive class. A positive value indicates a class that should be split. Also known as LCOM. Defined by Chidamber & Kemerer.
LCOM2Lack of Cohesion of Methods (2)The percentage of methods that do not access a specific attribute averaged over all attributes in the class.
LCOM3Lack of Cohesion of Methods (3)Also known as LCOM*. Defined by Henderson-Sellers. Values of 1 and greater are considered extreme lack of cohesion.
LCOM4Lack of Cohesion of Methods (4)Defined by Hitz & Montazeri. Value 1 indicates a good, cohesive class. Values 2 and greater are considered bad (lack of cohesion). Such a class should be split. LCOM4 is more suitable for VB than the other LCOMx variants.
LEAFSNumber of leaf classesNumber of leaf classes defined in project. A leaf class has no descendants.
LENLength of namesAverage length of names defined in VB files, including everything in LENV, LENC and LENP, plus Types, Enums, Type fields, Enum constants, controls, classes, structures and modules. Excludes compiler constants.
LENCLength of constant namesAverage length of all constant names defined in VB files. Excludes enum constants and compiler constants.
LENPLength of procedure nameLength of procedure name in characters.
LENPLength of procedure namesAverage length of procedure names defined in VB files, excluding event handlers and implementing procedures. Each property is counted only once. This metric may differ from the other LENP, which is defined for a slightly different set of procedures.
LENVLength of variable and parameter namesAverage length of names of variables, arrays and parameters defined in VB files, excluding parameters in event handlers and implementing procedures.
LENVgmLength of variable nameLength of variable name in characters.
LINESPhysical linesPhysical source lines, including code, comments, empty comments and empty lines. This metric is what you would see with a simple text editor or line count program.
LLINESLogical linesLogical source lines, including code, comments, empty comments and empty lines. One logical line may be split on several physical lines by a line continuation character. LLINES=LLOC + LLOC' + LLOW
LLOCLogical lines of codeCode lines count. One logical line may be split on several physical lines by a line continuation character.
LLOC'Logical lines of commentComment lines count. All full-line comments count, even if empty. End-of-codeline comments not included. One logical line may be split on several physical lines by a line continuation character.
LLOC%Code percentagePercentage of code lines. Counted from logical lines. LLOC%=LLOC/LLINES
LLOC'%Comment percentagePercentage of comment lines. Counted as full-line comments per logical lines. LLOC'%=LLOC/LLINES
LLOCtLines in call treeLogical lines of code in call tree. The number of lines that may potentially execute in a call to this procedure. Includes all procedures that may execute.
LLOWLogical lines of whitespaceLogical lines of whitespace. This is mostly equal to physical lines of whitespace, that is lines that have no other content than spaces, tabs and the line continuation character.
LLOW%Whitespace percentagePercentage of whitespace lines. Counted from logical lines. LLOW%=LLOW/LLINES
maxDCALLTMaximum depth of call treeThe depth of the largest call tree in the system: number of levels in the tree. maxDCALLT=Max(DCALLT)
maxDITMaximum depth of inheritance treemaxDIT is the depth of the deepest inheritance tree. maxDIT=max(DIT)
maxSCALLTMaximum size of call treeThe size of the largest call tree in the system: number of distinct procedures in the tree. maxSCALLT=Max(SCALLT)
MCOMMMeaningful commentsFull-line and end-of-line comments that have meaningful content.
MCOMM%Comment densityMeaningful comments divided by number of logical lines of code. MCOMM%=MCOMM/LLOC
MDLSNumber of standard modulesNumber of standard modules: .bas files and Module blocks.
MHFMethod hiding factorMeasures how class methods are hidden from other classes.
MIFMethod inheritance factorThe sum of inherited methods divided by the total number of methods in a project.
MPCMessage-Passing CouplingNumber of procedure calls going outside of a class. Each call is counted once, whether it's early bound, late bound or polymorphic.
NOCNumber of ChildrenNumber of immediate sub-classes that inherit from a class.
OHEFOperation hiding effectiveness factorClasses that do access operations / Classes that can access operations.
PARAMSProcedure parametersNumber of formal parameters defined in procedure header.
PFPolymorphism factorPercentage of actual polymorphic definitions of all possible polymorphic definitions. Also known as POF.
PPFParametric polymorphism factorPercentage of parameterized classes (generic classes).
PROCSNumber of proceduresNumber of procedures, including subs, functions, property blocks, API declarations and events.
RBReuse benefitReuse benefit RB is the extent to which you reuse your procedures. A procedure that is being called at several locations is said to be reused. A procedure that is called just once or not at all is not reused. RB measures the overall amount of reuse in the entire system.
RcReuse of constantsThe average number of times you reuse your constants and enum constants. Rc=uses/count - 1
READSReads from variableNumber of read instructions from variable.
RFCResponse for a Class First stepNumber of methods that can potentially be executed in response to a message received a class. Counts only the first level of the call tree.
RFC'Response for a ClassNumber of methods that can potentially be executed in response to a message received a class. Counts the full call tree.
ROOTSNumber of root classesNumber of root classes defined in project.
RSYSCRelative system complexityAverage system complexity among procedures. RSYSC=avg(SYSC)
RWReads and writesNumber of reads and writes. A single instruction may count both as a read and as a write. RW=READS+WRITES
SSpecialization ratioSpecialization ratio for classes. A class is specialized if it inherits from a parent class. In a project without superclasses, S is undefined. S=subclasses/superclasses
SCStructural complexityMeasures the external complexity of a procedure. Equals the number of other procedures called squared. Defined by Card & Agresti, also known as S(i). Used to calculate SYSC. SC=SFOUT^2
SCALLTSize of call treeNumber of distinct procedures in the call tree of a procedure, not counting the procedure itself.
SDENSStatement densityAverage number of statements per logical line. SDENS=STMT/LLOC
SFINStructural fan-inNumber of procedures that call a procedure.
SFINStructural fan-inNumber of files that use a file.
SFOUTStructural fan-outNumber of procedures that a procedure calls.
SFOUTStructural fan-outNumber of files that a file uses.
STMTNumber of statementsTotal number of all statements.
STMTcControl statementsNumber of control statements. A control statement is an executable statement that can alter the order in which statements are executed.
STMTdDeclarative statementsNumber of declarative statements, which are: procedure headers, variable and constant declarations, all statements outside procedures.
STMTncNon-control statementsNumber of non-control statements, which are executable statements that are neither control nor declarative statements. STMTnc=STMTx-STMTc
STMTxExecutable statementsNumber of executable statements. A statement is executable if it is not declarative. Executable statements can only exist within procedures. STMTx=STMT-STMTd
SYSCSystem complexityComposite measure of complexity inside procedures and between them. Defined by Card & Agresti, also known as C(i), or design complexity. SYSC=SC+DC
SYSCSystem complexitySum of SYSC over all procedures. Measures the total complexity of a project. SYSC=Sum(SYSC) over all procedures
TCCTotal cyclomatic complexityTotal cyclomatic complexity equals the total number of decisions + 1. TCC=Sum(CC)-Count(CC)+1
TCCiTight Class CohesionTCCi is 'TCC with inheritance'. TCC tells the connection density of the methods in a class. TCC varies from 0 (totally non-cohesive) to 1 (maximally cohesive).
TCClTight Class Cohesion (local)TCCl is 'TCC without inheritance'. TCC tells the connection density of the methods in a class. TCC varies from 0 (totally non-cohesive) to 1 (maximally cohesive).
TREADSTotal variable readsNumber of read instructions from global and module-level variables. TREADS=Sum(READS)
TRWTotal variable reads+writesNumber of reads from and writes to global and module-level variables. TRW=TREADS+TWRITES
TWRITESTotal variable writesNumber of write instructions to global and module-level variables. TWRITES=Sum(WRITES)
UReuse ratioReuse ratio for classes. A class is reused if it has descendants. U=(CLS-LEAFS)/CLS
UDTSNumber of user-defined typesNumber of user-defined types, that is, Type and/or Structure blocks.
UNIQName uniqueness ratioNumber of unique names divided by the total number of names. All the names in LEN are counted.
VARSVariables defined by classNumber of variables defined by class. Does not include inherited variables.
VARSNumber of variablesNumber of variables, including arrays, parameters and local variables.
VARSgmGlobal and module-level variablesTotal number of global and module-level variables and arrays.
VARSiVariables defined+inheritedNumber of variables defined and inherited by class.
VARSlocLocal variablesTotal number of procedure local variables and arrays, excluding parameters.
VARSlocLocal variablesNumber of procedure local variables and arrays, excluding parameters.
VARSnpNon-private variablesNumber of non-private variables defined by class. VARS excluding private variables.
VARUSRVariable usersNumber of modules that use a variable.
WMCWeighted Methods Per ClassNumber of subs, functions and property procedures in class.
WMCiMethods defined and inherited by classWMC including inherited methods.
WMCnpNon-private methods defined by classWMC excluding private methods.
WRITESWrites to variableNumber of write instructions to variable.
XQTExecutabilityExecutability measures the amount of executable statements. It equals the number of executable statements divided by the number of all statements. XQT=STMTx/STMT