Project metrics |
DATE | Project date | Date of newest file in project. |
DAYS | Days passed | Days passed between versions. |
LINES | Physical lines | Physical 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. |
LLINES | Logical lines | Logical 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 |
LLOC | Logical lines of code | Code lines count. One logical line may be split on several physical lines by a line continuation character. |
LLOC' | Logical lines of comment | Comment 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. |
LLOW | Logical lines of whitespace | Logical 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. |
LLOC% | Code percentage | Percentage of code lines. Counted from logical lines. LLOC%=LLOC/LLINES |
LLOC'% | Comment percentage | Percentage of comment lines. Counted as full-line comments per logical lines. LLOC'%=LLOC/LLINES |
LLOW% | Whitespace percentage | Percentage of whitespace lines. Counted from logical lines. LLOW%=LLOW/LLINES |
MCOMM | Meaningful comments | Full-line and end-of-line comments that have meaningful content. |
MCOMM% | Comment density | Meaningful comments divided by number of logical lines of code. MCOMM%=MCOMM/LLOC |
kB | Project size | Project size in kilobytes. Includes all source files included in the analysis, excluding referenced files. |
DATEF | Average file date | Average file date. |
STMT | Number of statements | Total number of all statements. |
STMTd | Declarative statements | Number of declarative statements, which are: procedure headers, variable and constant declarations, all statements outside procedures. |
STMTx | Executable statements | Number of executable statements. A statement is executable if it is not declarative. Executable statements can only exist within procedures. STMTx=STMT-STMTd |
STMTc | Control statements | Number of control statements. A control statement is an executable statement that can alter the order in which statements are executed. |
STMTnc | Non-control statements | Number of non-control statements, which are executable statements that are neither control nor declarative statements. STMTnc=STMTx-STMTc |
XQT | Executability | Executability measures the amount of executable statements. It equals the number of executable statements divided by the number of all statements. XQT=STMTx/STMT |
CTRL | Control density | Control 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 |
SDENS | Statement density | Average number of statements per logical line. SDENS=STMT/LLOC |
FILES | Number of files | Number of files in project. |
PROCS | Number of procedures | Number of procedures, including subs, functions, property blocks, API declarations and events. |
VARS | Number of variables | Number of variables, including arrays, parameters and local variables. |
CONSTS | Number of consts | Number of constants, excluding enum constants. |
UDTS | Number of user-defined types | Number of user-defined types, that is, Type and/or Structure blocks. |
ENUMS | Number of Enums | Number of enumeration names. |
ENUMCS | Number of Enum constants | Number of enumeration constant names. |
VARSgm | Global and module-level variables | Total number of global and module-level variables and arrays. |
VARSloc | Local variables | Total number of procedure local variables and arrays, excluding parameters. |
FORMS | Number of forms | Number of real forms excluding any UserControls. |
MDLS | Number of standard modules | Number of standard modules: .bas files and Module blocks. |
dPROCS | Number of dead procedures | Number of unused procedures. |
dVARS | Number of dead variables | Number of unused variables. |
dCONSTS | Number of dead consts | Number of unused constants. |
dLINES | Dead lines | Physical lines in dead procedures. |
dUDTS | Number of dead user-defined types | Number of unused user-defined types, that is, Type and/or Structure blocks. |
dENUMS | Number of dead Enums | Number of unused enumeration names. |
dENUMCS | Number of dead Enum constants | Number of unused enumeration constants. |
DEAD | Deadness index | Evaluates the average percentage of dead code. DEAD=(dPROCS + dVARS + dCONSTS) / (PROCS + VARS + CONSTS) |
LEN | Length of names | Average 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. |
LENV | Length of variable and parameter names | Average length of names of variables, arrays and parameters defined in VB files, excluding parameters in event handlers and implementing procedures. |
LENC | Length of constant names | Average length of all constant names defined in VB files. Excludes enum constants and compiler constants. |
LENP | Length of procedure names | Average 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. |
UNIQ | Name uniqueness ratio | Number of unique names divided by the total number of names. All the names in LEN are counted. |
ENUMSZ | Average Enum size | Average number of constants in an Enum block. ENUMSZ=ENUMCS/ENUMS |
ENUMR | Enum ratio | The percentage of Enum constants among all constants. ENUMR=ENUMCS/(ENUMCS+CONSTS) |
DECDENS | Decision density | Indicates 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 |
TCC | Total cyclomatic complexity | Total cyclomatic complexity equals the total number of decisions + 1. TCC=Sum(CC)-Count(CC)+1 |
SYSC | System complexity | Sum of SYSC over all procedures. Measures the total complexity of a project. SYSC=Sum(SYSC) over all procedures |
RSYSC | Relative system complexity | Average system complexity among procedures. RSYSC=avg(SYSC) |
CALLS | Number of procedure calls | Number 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. |
CALLDENS | Call density | Average number of calls on a code line. Measures the modularity or structuredness. CALLDENS=CALLS/LLOC |
maxDCALLT | Maximum depth of call tree | The depth of the largest call tree in the system: number of levels in the tree. maxDCALLT=Max(DCALLT) |
maxSCALLT | Maximum size of call tree | The size of the largest call tree in the system: number of distinct procedures in the tree. maxSCALLT=Max(SCALLT) |
RB | Reuse benefit | Reuse 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. |
Rc | Reuse of constants | The average number of times you reuse your constants and enum constants. Rc=uses/count - 1 |
CLS | Number of classes | Number of classes defined in project. |
ROOTS | Number of root classes | Number of root classes defined in project. |
LEAFS | Number of leaf classes | Number of leaf classes defined in project. A leaf class has no descendants. |
INTERFS | Number of Interface definitions | Number of Interfaces defined in project. |
maxDIT | Maximum depth of inheritance tree | maxDIT is the depth of the deepest inheritance tree. maxDIT=max(DIT) |
CLSa | Number of abstract classes | Number 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. |
CLSc | Number of concrete classes | Number of concrete classes defined in project. A concrete class is one that is not abstract (see CLSa). CLSc=CLS-CLSa |
U | Reuse ratio | Reuse ratio for classes. A class is reused if it has descendants. U=(CLS-LEAFS)/CLS |
S | Specialization ratio | Specialization 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 |
MIF | Method inheritance factor | The sum of inherited methods divided by the total number of methods in a project. |
AIF | Attribute inheritance factor | The sum of inherited variables divided by the total number of variables in a project. |
MHF | Method hiding factor | Measures how class methods are hidden from other classes. |
AHF | Attribute hiding factor | Measures how class attributes (variables) are hidden from other classes. |
PF | Polymorphism factor | Percentage of actual polymorphic definitions of all possible polymorphic definitions. Also known as POF. |
CF | Coupling factor | Measures the actual couplings among classes in relation to the maximum number of possible couplings. Also known as COF. |
OHEF | Operation hiding effectiveness factor | Classes that do access operations / Classes that can access operations. |
AHEF | Attribute hiding effectiveness factor | Classes that do access attributes / Classes that can access attributes. |
IIF | Internal inheritance factor | The relative amount of internal inheritance. Internal inheritance happens when a class inherits another class in the same system (not an external class). |
PPF | Parametric polymorphism factor | Percentage of parameterized classes (generic classes). |
TREADS | Total variable reads | Number of read instructions from global and module-level variables. TREADS=Sum(READS) |
TWRITES | Total variable writes | Number of write instructions to global and module-level variables. TWRITES=Sum(WRITES) |
TRW | Total variable reads+writes | Number of reads from and writes to global and module-level variables. TRW=TREADS+TWRITES |
DATADENS | Data access density | Average number of variable access instructions per logical line of code. DATADENS=TRW/LLOC |
IOg% | Global I/O ratio | Amount of data flow via global and module-level variables versus procedure parameters and function return values. IOg%=Sum(IOg) / Sum(IOg+IOp) |
File metrics |
LINES | Physical lines | Physical 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. |
LLINES | Logical lines | Logical 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 |
LLOC | Logical lines of code | Code lines count. One logical line may be split on several physical lines by a line continuation character. |
LLOC' | Logical lines of comment | Comment 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. |
LLOW | Logical lines of whitespace | Logical 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. |
LLOC% | Code percentage | Percentage of code lines. Counted from logical lines. LLOC%=LLOC/LLINES |
LLOC'% | Comment percentage | Percentage of comment lines. Counted as full-line comments per logical lines. LLOC'%=LLOC/LLINES |
LLOW% | Whitespace percentage | Percentage of whitespace lines. Counted from logical lines. LLOW%=LLOW/LLINES |
MCOMM | Meaningful comments | Full-line and end-of-line comments that have meaningful content. |
MCOMM% | Comment density | Meaningful comments divided by number of logical lines of code. MCOMM%=MCOMM/LLOC |
kB | File size | File size in kilobytes. |
DATEF | File date | File date. |
PROCS | Number of procedures | Number of procedures, including subs, functions, property blocks, API declarations and events. |
VARS | Number of variables | Number of variables, including arrays, parameters and local variables. |
CONSTS | Number of consts | Number of constants, excluding enum constants. |
SFIN | Structural fan-in | Number of files that use a file. |
SFOUT | Structural fan-out | Number of files that a file uses. |
STMT | Number of statements | Total number of all statements. |
STMTd | Declarative statements | Number of declarative statements, which are: procedure headers, variable and constant declarations, all statements outside procedures. |
STMTx | Executable statements | Number of executable statements. A statement is executable if it is not declarative. Executable statements can only exist within procedures. STMTx=STMT-STMTd |
STMTc | Control statements | Number of control statements. A control statement is an executable statement that can alter the order in which statements are executed. |
STMTnc | Non-control statements | Number of non-control statements, which are executable statements that are neither control nor declarative statements. STMTnc=STMTx-STMTc |
XQT | Executability | Executability measures the amount of executable statements. It equals the number of executable statements divided by the number of all statements. XQT=STMTx/STMT |
CTRL | Control density | Control 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 |
Class metrics |
WMC | Weighted Methods Per Class | Number of subs, functions and property procedures in class. |
DIT | Depth of Inheritance Tree | Number of ancestor classes. |
NOC | Number of Children | Number of immediate sub-classes that inherit from a class. |
CBO | Coupling between Object Classes | Number of classes to which a class is coupled. Coupling is defined as method call or variable access. |
RFC | Response for a Class First step | Number 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 Class | Number of methods that can potentially be executed in response to a message received a class. Counts the full call tree. |
LCOM1 | Lack 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. |
LCOM2 | Lack of Cohesion of Methods (2) | The percentage of methods that do not access a specific attribute averaged over all attributes in the class. |
LCOM3 | Lack of Cohesion of Methods (3) | Also known as LCOM*. Defined by Henderson-Sellers. Values of 1 and greater are considered extreme lack of cohesion. |
LCOM4 | Lack 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. |
TCCi | Tight Class Cohesion | TCCi 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). |
LCCi | Loose Class Cohesion | LCCi 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." |
TCCl | Tight 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). |
LCCl | Loose 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." |
MPC | Message-Passing Coupling | Number of procedure calls going outside of a class. Each call is counted once, whether it's early bound, late bound or polymorphic. |
LINES | Physical lines | Physical 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. |
LLINES | Logical lines | Logical 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 |
LLOC | Logical lines of code | Code lines count. One logical line may be split on several physical lines by a line continuation character. |
LLOC' | Logical lines of comment | Comment 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. |
LLOW | Logical lines of whitespace | Logical 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. |
STMT | Number of statements | Total number of all statements. |
STMTd | Declarative statements | Number of declarative statements, which are: procedure headers, variable and constant declarations, all statements outside procedures. |
STMTx | Executable statements | Number of executable statements. A statement is executable if it is not declarative. Executable statements can only exist within procedures. STMTx=STMT-STMTd |
STMTc | Control statements | Number of control statements. A control statement is an executable statement that can alter the order in which statements are executed. |
STMTnc | Non-control statements | Number of non-control statements, which are executable statements that are neither control nor declarative statements. STMTnc=STMTx-STMTc |
XQT | Executability | Executability measures the amount of executable statements. It equals the number of executable statements divided by the number of all statements. XQT=STMTx/STMT |
CTRL | Control density | Control 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 |
IMPL | Implemented interfaces | Number of interfaces implemented by class. |
WMCnp | Non-private methods defined by class | WMC excluding private methods. |
WMCi | Methods defined and inherited by class | WMC including inherited methods. |
VARS | Variables defined by class | Number of variables defined by class. Does not include inherited variables. |
VARSnp | Non-private variables | Number of non-private variables defined by class. VARS excluding private variables. |
VARSi | Variables defined+inherited | Number of variables defined and inherited by class. |
EVENTS | Events | Events defined by class. This metric counts the event definitions, not event handlers. |
CTORS | Constructors | Constructors defined by class. VB.NET Sub New is a constructor, whereas VB Classic Class_Initialize is an event. |
CSZ | Class size | Size of class measured by number of methods and variables. CSZ=WMC + VARS |
CIS | Class interface size | Size of class interface measured by number of non-private methods and variables. CIS=WMCnp + VARSnp |
TCC | Total cyclomatic complexity | Total cyclomatic complexity equals the total number of decisions + 1. TCC=Sum(CC)-Count(CC)+1 |
Procedure metrics |
LINES | Physical lines | Physical 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. |
LLINES | Logical lines | Logical 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 |
LLOC | Logical lines of code | Code lines count. One logical line may be split on several physical lines by a line continuation character. |
LLOC' | Logical lines of comment | Comment 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. |
LLOW | Logical lines of whitespace | Logical 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. |
MCOMM | Meaningful comments | Full-line and end-of-line comments that have meaningful content. |
LLOCt | Lines in call tree | Logical 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. |
PARAMS | Procedure parameters | Number of formal parameters defined in procedure header. |
VARSloc | Local variables | Number of procedure local variables and arrays, excluding parameters. |
STMT | Number of statements | Total number of all statements. |
STMTd | Declarative statements | Number of declarative statements, which are: procedure headers, variable and constant declarations, all statements outside procedures. |
STMTx | Executable statements | Number of executable statements. A statement is executable if it is not declarative. Executable statements can only exist within procedures. STMTx=STMT-STMTd |
STMTc | Control statements | Number of control statements. A control statement is an executable statement that can alter the order in which statements are executed. |
STMTnc | Non-control statements | Number of non-control statements, which are executable statements that are neither control nor declarative statements. STMTnc=STMTx-STMTc |
XQT | Executability | Executability measures the amount of executable statements. It equals the number of executable statements divided by the number of all statements. XQT=STMTx/STMT |
CTRL | Control density | Control 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 |
IOg | Global I/O | Number of global and module-level variables accessed by a procedure. |
IOp | Parameter I/O | Number of parameters used or returned by a procedure. The function return value counts as one parameter (output parameter). |
IOvars | Input and output variables | Total number of input and output variables for a procedure, including parameters and function return value. IOvars=IOg+IOp |
IFIN | Informational fan-in | Amount of data read. Procedures called + parameters read + global variables read. |
IFOUT | Informational fan-out | Amount of data written. Procedures that call this procedure + ByRef parameters written to + global variables written to. |
IFIO | Informational fan-in x fan-out | Fan-in multiplied by fan-out. IFIO=IFIN*IFOUT |
IC1 | Informational complexity | Fan-in multiplied by fan-out multiplied by procedure length (logical lines of code). IC1=IFIO*LLOC |
CC | Cyclomatic complexity | McCabe cyclomatic complexity equals the number of execution paths through a procedure. Also known as V(C). |
CC2 | Cyclomatic complexity with Booleans | CC2 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). |
CC3 | Cyclomatic complexity without Cases | CC3 equals the regular CC metric, but each Select Case block is counted as one branch, not as multiple branches. |
DCOND | Depth of conditional nesting | Maximum number of nested conditional statements in a procedure. |
DLOOP | Depth of looping | Maximum number of nested loop statements in a procedure. |
DCALLT | Depth of call tree | Maximum number of nested procedure calls from a procedure. Recursive calls are not counted. |
SCALLT | Size of call tree | Number of distinct procedures in the call tree of a procedure, not counting the procedure itself. |
SC | Structural complexity | Measures 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 |
DC | Data complexity | Measures 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) |
SYSC | System complexity | Composite measure of complexity inside procedures and between them. Defined by Card & Agresti, also known as C(i), or design complexity. SYSC=SC+DC |
LENP | Length of procedure name | Length of procedure name in characters. |
SFIN | Structural fan-in | Number of procedures that call a procedure. |
SFOUT | Structural fan-out | Number of procedures that a procedure calls. |
Variable metrics |
READS | Reads from variable | Number of read instructions from variable. |
WRITES | Writes to variable | Number of write instructions to variable. |
RW | Reads and writes | Number of reads and writes. A single instruction may count both as a read and as a write. RW=READS+WRITES |
FLOWS | Data flows | Number of data flows into and out of a variable. FLOWS=READS*WRITES |
VARUSR | Variable users | Number of modules that use a variable. |
LENVgm | Length of variable name | Length of variable name in characters. |