This page lists the available metrics along with reference values for VB6 code.
See also:
Metrics list
Metrics list, sorted
This page lists statistics on a reference base of 25 Visual Basic 6.0 systems. There are 23 single-project (.vbp) systems and 2 project groups (.vbg). From now own we refer to the systems simpy as "projects". In total the code consists of 2.1 million physical lines. The reference base was last updated in 2010 for Project Analyzer v10.0.
These metrics are provided to be an indication of typical values. They are not meant to be used as benchmarks nor do they represent good, bad or average code. They are provided to give an idea of what kind of ranges the metrics may lie in.
The projects in question are real functional VB6 projects by different authors. They represent different coding styles and application areas. There are both small and large projects included (from mere 1825 up to 1.2 million lines). Most projects are standard executables but there are also DLL and OCX projects. The projects were analyzed under the following settings: Analyze a single .vbp file, unselect COM files, disable DLL analysis, accept late-bound references.
Since they are VB6 projects, some metrics are 0 by definition. For example, MIF (method inheritance factor) is 0 as there is no method inheritance in VB6.
Here we have picked up some interesting findings from the analyses of the 20 reference projects. You shouldn't take these values as benchmarks, but as an idea of typical values. According to this data, in the average VB6 project:
In the average program, we find the following values for the average file:
In the average program, we find the following averages for a class. It has to be noted that VB6 is not a fully class-oriented language, so these metrics may be very different for VB.NET.
In the average program, we find the following averages for a procedure:
In the average program, the average variable has the following metrics (global and module-level variables, no locals):
The data in the table below are given for the 25 projects mentioned above. Average is the average of project-level averages. Min is the minimum average, Max is the maximum average among those 20 projects. The Outliers column displays limits outside which the averages can be considered exceptional. When the column displays "-", no exceptional values were found.
Example: PROCS/file. This example shows how to interpret the data in the table below. For each file in project A, count the number of procedures. Take the average of these counts. It is the PROCS/file metric for project A. — Do the same for all the 20 projects. Suppose you get values such as {67.7, 9.0, 22.2, 13.9, ...}.
Project metric | Name | Average | Min | Max | Outliers | Description |
---|---|---|---|---|---|---|
DATE | Project date | 30.6.03 | 30.11.98 | 2.9.08 | - | Date of newest file in project. |
LINES | Physical lines | 84,392 | 1,825 | 1,236k | >122,105 | 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 | 82,376 | 1,680 | 1,220k | >118,885 | 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 | 49,811 | 1,152 | 720,218 | >78,246 | Code lines count. One logical line may be split on several physical lines by a line continuation character. |
LLOC' | Logical lines of comment | 13,777 | 119 | 183,937 | >18,951 | 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 | 18,788 | 287 | 315,814 | >26,398 | 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 | 69% | 23% | 92% | <34% | Percentage of code lines. Counted from logical lines. LLOC%=LLOC/LLINES |
LLOC'% | Comment percentage | 14% | 0.83% | 35% | >34% | Percentage of comment lines. Counted as full-line comments per logical lines. LLOC'%=LLOC/LLINES |
LLOW% | Whitespace percentage | 17% | 1.90% | 72% | <4%, >29% | Percentage of whitespace lines. Counted from logical lines. LLOW%=LLOW/LLINES |
MCOMM | Meaningful comments | 10,385 | 162 | 119,552 | >16,836 | Full-line and end-of-line comments that have meaningful content. |
MCOMM% | Comment density | 20% | 1.61% | 63% | >44% | Meaningful comments divided by number of logical lines of code. MCOMM%=MCOMM/LLOC |
kB | Project size | 3444.7 | 64 | 47,412 | >4,327 | Project size in kilobytes. Includes all source files included in the analysis, excluding referenced files. |
DATEF | Average file date | 20.10.02 | 6.6.98 | 14.3.08 | - | Average file date. |
STMT | Number of statements | 47731.0 | 1,171 | 660,889 | >82,740 | Total number of all statements. |
STMTd | Declarative statements | 11519.9 | 379 | 175,766 | >11,727 | Number of declarative statements, which are: procedure headers, variable and constant declarations, all statements outside procedures. |
STMTx | Executable statements | 36211.1 | 792 | 485,123 | >69,941 | 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 | 17443.0 | 315 | 266,083 | >25,082 | 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 | 18768.2 | 477 | 219,040 | >41,222 | Number of non-control statements, which are executable statements that are neither control nor declarative statements. STMTnc=STMTx-STMTc |
XQT | Executability | 76% | 59% | 92% | - | 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 | 42% | 29% | 55% | - | 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 | 1.0 | 0.92 | 1.10 | <0.97, >1.04 | Average number of statements per logical line. SDENS=STMT/LLOC |
FILES | Number of files | 189.6 | 19 | 2,314 | >293 | Number of files in project. |
PROCS | Number of procedures | 3116.2 | 97 | 50,854 | >3,016 | Number of procedures, including subs, functions, property blocks, API declarations and events. |
VARS | Number of variables | 6039.7 | 186 | 78,695 | >8,466 | Number of variables, including arrays, parameters and local variables. |
CONSTS | Number of consts | 496.8 | 0 | 3,453 | >1,227 | Number of constants, excluding enum constants. |
UDTS | Number of user-defined types | 25.8 | 0 | 189 | >57 | Number of user-defined types, that is, Type and/or Structure blocks. |
ENUMS | Number of Enums | 49.3 | 0 | 764 | >65 | Number of enumeration names. |
ENUMCS | Number of Enum constants | 1012.0 | 0 | 21,879 | >635 | Number of enumeration constant names. |
VARSgm | Global and module-level variables | 956.8 | 8 | 15,118 | >1,102 | Total number of global and module-level variables and arrays. |
VARSloc | Local variables | 2619.5 | 65 | 30,096 | >4,135 | Total number of procedure local variables and arrays, excluding parameters. |
FORMS | Number of forms | 39.4 | 0 | 362 | >104 | Number of real forms excluding any UserControls. |
MDLS | Number of standard modules | 16.1 | 0 | 77 | >43 | Number of standard modules: .bas files and Module blocks. |
dPROCS | Number of dead procedures | 591.6 | 0 | 8,529 | >1,148 | Number of unused procedures. |
dVARS | Number of dead variables | 402.3 | 1 | 4,327 | >553 | Number of unused variables. |
dCONSTS | Number of dead consts | 176.0 | 0 | 1,219 | >380 | Number of unused constants. |
dLINES | Dead lines | 12862.4 | 0 | 170,397 | >30,952 | Physical lines in dead procedures. |
dUDTS | Number of dead user-defined types | 3.3 | 0 | 38 | >5 | Number of unused user-defined types, that is, Type and/or Structure blocks. |
dENUMS | Number of dead Enums | 6.3 | 0 | 66 | >5 | Number of unused enumeration names. |
dENUMCS | Number of dead Enum constants | 482.9 | 0 | 11,184 | >127 | Number of unused enumeration constants. |
DEAD | Deadness index | 15% | 0.06% | 45% | <4%, >20% | Evaluates the average percentage of dead code. DEAD=(dPROCS + dVARS + dCONSTS) / (PROCS + VARS + CONSTS) |
LEN | Length of names | 9.92 | 5.7 | 14.6 | >13.9 | 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. |
LENV | Length of variable and parameter names | 7.99 | 4.9 | 11.8 | - | 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 | 13.42 | 0.0 | 26.2 | <4.0, >22.0 | Average length of all constant names defined in VB files. |
LENP | Length of procedure names | 13.72 | 8.8 | 18.0 | - | 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 | 54% | 24% | 88% | <36%, >74% | Number of unique names divided by the total number of names. All the names in LEN are counted. |
ENUMSZ | Average Enum size | 5.99 | 0.0 | 28.6 | >22.6 | Average number of constants in an Enum block. ENUMSZ=ENUMCS/ENUMS |
ENUMR | Enum ratio | 25% | 0% | 90% | - | The percentage of Enum constants among all constants. ENUMR=ENUMCS/(ENUMCS+CONSTS) |
DECDENS | Decision density | 0.20 | 0.14 | 0.25 | - | 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 | 5244.1 | 141 | 56,551 | >8,644 | Total cyclomatic complexity equals the total number of decisions + 1. TCC=Sum(CC)-Count(CC)+1 |
SYSC | System complexity | 945014.2 | 151 | 22,827k | >111,481 | Sum of SYSC over all procedures. Measures the total complexity of a project. SYSC=Sum(SYSC) over all procedures |
RSYSC | Relative system complexity | 38.67 | 1.5 | 459.0 | >47.3 | Average system complexity among procedures. RSYSC=avg(SYSC) |
CALLS | Number of procedure calls | 13323.5 | 46 | 233,284 | >8,532 | 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 | 0.15 | 0.02 | 0.38 | - | Average number of calls on a code line. Measures the modularity or structuredness. CALLDENS=CALLS/LLOC |
maxDCALLT | Maximum depth of call tree | 14.2 | 2 | 76 | >32 | 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 | 1303.4 | 4 | 24,156 | >953 | The size of the largest call tree in the system: number of distinct procedures in the tree. maxSCALLT=Max(SCALLT) |
RB | Reuse benefit | 0.51 | 0.08 | 0.80 | - | 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 | 3.85 | 0.53 | 25.64 | >10.45 | The average number of times you reuse your constants and enum constants. Rc=uses/count - 1 |
CLS | Number of classes | 104.8 | 1 | 1,546 | >100 | Number of classes defined in project. |
ROOTS | Number of root classes | 104.8 | 1 | 1,546 | >100 | Number of root classes defined in project. |
LEAFS | Number of leaf classes | 104.8 | 1 | 1,546 | >100 | Number of leaf classes defined in project. A leaf class has no descendants. |
INTERFS | Number of Interface definitions | 0.0 | 0 | 0 | - | Number of Interfaces defined in project. |
maxDIT | Maximum depth of inheritance tree | 0.0 | 0 | 0 | - | maxDIT is the depth of the deepest inheritance tree. maxDIT=max(DIT) |
CLSa | Number of abstract classes | 2.2 | 0 | 37 | >0 | 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 | 102.7 | 1 | 1,509 | >100 | Number of concrete classes defined in project. A concrete class is one that is not abstract (see CLSa). CLSc=CLS-CLSa |
U | Reuse ratio | 0.00 | 0.00 | 0.00 | - | Reuse ratio for classes. A class is reused if it has descendants. U=(CLS - LEAFS) / CLS |
S | Specialization ratio | 0.00 | 0.0 | 0.0 | - | 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 | 0.00 | 0.00 | 0.00 | - | The sum of inherited methods divided by the total number of methods in a project. |
AIF | Attribute inheritance factor | 0.00 | 0.00 | 0.00 | - | The sum of inherited variables divided by the total number of variables in a project. |
MHF | Method hiding factor | 0.26 | 0.06 | 0.78 | >0.62 | Measures how class methods are hidden from other classes. |
AHF | Attribute hiding factor | 0.88 | 0.33 | 1.00 | <0.92 | Measures how class attributes (variables) are hidden from other classes. |
PF | Polymorphism factor | 0.00 | 0.00 | 0.00 | - | Percentage of actual polymorphic definitions of all possible polymorphic definitions. Also known as POF. |
CF | Coupling factor | 0.10 | 0.00 | 0.50 | >0.38 | Measures the actual couplings among classes in relation to the maximum number of possible couplings. Also known as COF. |
OHEF | Operation hiding effectiveness factor | 0.04 | 0.00 | 0.43 | >0.07 | Classes that do access operations / Classes that can access operations. |
AHEF | Attribute hiding effectiveness factor | 0.82 | 0.01 | 3.00 | >2.07 | Classes that do access attributes / Classes that can access attributes. |
IIF | Internal inheritance factor | 0.00 | 0.00 | 0.00 | - | 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 | 0.00 | 0.00 | 0.00 | - | Percentage of parameterized classes (generic classes). |
TREADS | Total variable reads | 9643.9 | 75 | 141,739 | >9,330 | Number of read instructions from global and module-level variables. TREADS=Sum(READS) |
TWRITES | Total variable writes | 2527.2 | 53 | 25,587 | >3,623 | Number of write instructions to global and module-level variables. TWRITES=Sum(WRITES) |
TRW | Total variable reads+writes | 12171.1 | 132 | 167,326 | >12,840 | Number of reads from and writes to global and module-level variables. TRW=TREADS+TWRITES |
DATADENS | Data access density | 0.23 | 0.07 | 0.76 | >0.47 | Average number of variable access instructions per logical line of code. DATADENS=TRW/LLOC |
IOg% | Global I/O ratio | 61% | 36% | 94% | >91% | Amount of data flow via global and module-level variables versus procedure parameters and function return values. IOg%=Sum(IOg) / Sum(IOg+IOp) |
File average | Name | Average | Min | Max | Outliers | Description |
LINES/file | Physical lines | 633.4 | 152.1 | 1765.7 | - | 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/file | Logical lines | 609.1 | 140.0 | 1757.6 | >1733.2 | 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/file | Logical lines of code | 396.9 | 96.0 | 1294.1 | >933.3 | Code lines count. One logical line may be split on several physical lines by a line continuation character. |
LLOC'/file | Logical lines of comment | 94.0 | 1.7 | 430.2 | >232.0 | 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/file | Logical lines of whitespace | 118.2 | 7.6 | 873.2 | >263.1 | 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%/file | Code percentage | 66% | 34% | 92% | <45%, >88% | Percentage of code lines. Counted from logical lines. LLOC%=LLOC/LLINES |
LLOC'%/file | Comment percentage | 12% | 0.50% | 28% | - | Percentage of comment lines. Counted as full-line comments per logical lines. LLOC'%=LLOC/LLINES |
LLOW%/file | Whitespace percentage | 22% | 2% | 59% | <3%, >36% | Percentage of whitespace lines. Counted from logical lines. LLOW%=LLOW/LLINES |
MCOMM/file | Meaningful comments | 82.1 | 2.7 | 372.8 | >232.8 | Full-line and end-of-line comments that have meaningful content. |
MCOMM%/file | Comment density | 29% | 1.16% | 182% | >60% | Meaningful comments divided by number of logical lines of code. MCOMM%=MCOMM/LLOC |
kB/file | File size | 26.7 | 5.4 | 57.8 | - | File size in kilobytes. |
DATEF/file | File date | 20.10.02 | 6.6.98 | 14.3.08 | - | File date. |
PROCS/file | Number of procedures | 20.9 | 8.3 | 67.7 | >49.5 | Number of procedures, including subs, functions, property blocks, API declarations and events. |
VARS/file | Number of variables | 6.8 | 1.1 | 17.8 | >17.7 | Number of variables, including arrays, parameters and local variables. |
CONSTS/file | Number of consts | 7.2 | 0.0 | 41.0 | >25.9 | Number of constants, excluding enum constants. |
SFIN/file | Structural fan-in | 5.1 | 1.6 | 22.6 | >12.0 | Number of files that use a file. |
SFOUT/file | Structural fan-out | 5.3 | 1.9 | 23.4 | >12.1 | Number of files that a file uses. |
STMT/file | Number of statements | 403.4 | 97.6 | 1420.9 | >944.1 | Total number of all statements. |
STMTd/file | Declarative statements | 86.7 | 25.9 | 264.3 | >223.2 | Number of declarative statements, which are: procedure headers, variable and constant declarations, all statements outside procedures. |
STMTx/file | Executable statements | 316.7 | 66.0 | 1176.0 | >809.5 | Number of executable statements. A statement is executable if it is not declarative. Executable statements can only exist within procedures. STMTx=STMT-STMTd |
STMTc/file | Control statements | 134.8 | 26.3 | 552.6 | >300.3 | Number of control statements. A control statement is an executable statement that can alter the order in which statements are executed. |
STMTnc/file | Non-control statements | 181.9 | 39.8 | 623.4 | >516.4 | Number of non-control statements, which are executable statements that are neither control nor declarative statements. STMTnc=STMTx-STMTc |
XQT/file | Executability | 63% | 46% | 78% | - | 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/file | Control density | 33% | 20% | 51% | - | 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 average | Name | Average | Min | Max | Outliers | Description |
WMC/cls | Weighted Methods Per Class | 24.6 | 1.0 | 55.8 | - | Number of subs, functions and property procedures in class. |
DIT/cls | Depth of Inheritance Tree | 0.0 | 0.0 | 0.0 | - | Number of ancestor classes. |
NOC/cls | Number of Children | 0.0 | 0.0 | 0.0 | - | Number of immediate sub-classes that inherit from a class. |
CBO/cls | Coupling between Object Classes | 4.4 | 0.0 | 33.3 | >11.0 | Number of classes to which a class is coupled. Coupling is defined as method call or variable access. |
RFC/cls | Response for a Class First step | 39.9 | 1.0 | 85.2 | - | 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'/cls | Response for a Class | 286.0 | 1.0 | 2429.7 | >327.0 | Number of methods that can potentially be executed in response to a message received a class. Counts the full call tree. |
LCOM1/cls | Lack of Cohesion of Methods (1) | 541.8 | 0.0 | 4046.8 | >1311.3 | 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/cls | Lack of Cohesion of Methods (2) | 0.57 | 0.00 | 0.92 | - | The percentage of methods that do not access a specific attribute averaged over all attributes in the class. |
LCOM3/cls | Lack of Cohesion of Methods (3) | 0.63 | 0.00 | 1.00 | - | Also known as LCOM*. Defined by Henderson-Sellers. Values of 1 and greater are considered extreme lack of cohesion. |
LCOM4/cls | Lack of Cohesion of Methods (4) | 5.7 | 1.0 | 37.7 | >9.0 | 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/cls | Tight Class Cohesion | 0.54 | 0.00 | 1.00 | - | 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/cls | Loose Class Cohesion | 0.66 | 0.00 | 1.00 | <0.10 | 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/cls | Tight Class Cohesion (local) | 0.54 | 0.00 | 1.00 | - | 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/cls | Loose Class Cohesion (local) | 0.66 | 0.00 | 1.00 | <0.10 | 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/cls | Message-Passing Coupling | 36.8 | 0.0 | 135.6 | - | Number of procedure calls going outside of a class. Each call is counted once, whether it's early bound, late bound or polymorphic. |
LINES/cls | Physical lines | 649.7 | 34.0 | 1772.0 | - | 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/cls | Logical lines | 618.9 | 34.0 | 1745.6 | - | 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/cls | Logical lines of code | 379.2 | 19.0 | 1010.0 | - | Code lines count. One logical line may be split on several physical lines by a line continuation character. |
LLOC'/cls | Logical lines of comment | 85.4 | 4.2 | 460.0 | >207.3 | 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/cls | Logical lines of whitespace | 154.2 | 5.0 | 1424.2 | >345.1 | 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/cls | Number of statements | 379.3 | 19.0 | 1024.7 | - | Total number of all statements. |
STMTd/cls | Declarative statements | 101.4 | 7.0 | 269.8 | >257.7 | Number of declarative statements, which are: procedure headers, variable and constant declarations, all statements outside procedures. |
STMTx/cls | Executable statements | 277.9 | 12.0 | 754.8 | - | Number of executable statements. A statement is executable if it is not declarative. Executable statements can only exist within procedures. STMTx=STMT-STMTd |
STMTc/cls | Control statements | 124.1 | 9.0 | 401.0 | >374.8 | Number of control statements. A control statement is an executable statement that can alter the order in which statements are executed. |
STMTnc/cls | Non-control statements | 153.9 | 3.0 | 353.8 | - | Number of non-control statements, which are executable statements that are neither control nor declarative statements. STMTnc=STMTx-STMTc |
XQT/cls | Executability | 61% | 42% | 87% | >85% | 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/cls | Control density | 39% | 22% | 75% | >73% | 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/cls | Implemented interfaces | 0.1 | 0.0 | 1.0 | >0.5 | Number of interfaces implemented by class. |
WMCnp/cls | Non-private methods defined by class | 19.5 | 0.0 | 46.5 | >46.0 | WMC excluding private methods. |
WMCi/cls | Methods defined and inherited by class | 24.6 | 1.0 | 55.8 | - | WMC including inherited methods. |
VARS/cls | Variables defined by class | 7.6 | 0.0 | 20.7 | <0.3, >12.8 | Number of variables defined by class. Does not include inherited variables. |
VARSnp/cls | Non-private variables | 0.8 | 0.0 | 4.3 | >2.5 | Number of non-private variables defined by class. VARS excluding private variables. |
VARSi/cls | Variables defined+inherited | 7.6 | 0.0 | 20.7 | <0.3, >12.8 | Number of variables defined and inherited by class. |
EVENTS/cls | Events | 0.9 | 0.0 | 6.0 | >2.8 | Events defined by class. This metric counts the event definitions, not event handlers. |
CTORS/cls | Constructors | 0.0 | 0.0 | 0.0 | - | Constructors defined by class. VB.NET Sub New is a constructor, whereas VB Classic Class_Initialize is an event. |
CSZ/cls | Class size | 32.1 | 1.0 | 76.5 | - | Size of class measured by number of methods and variables. CSZ=WMC + VARS |
CIS/cls | Class interface size | 20.3 | 0.0 | 47.0 | >45.4 | Size of class interface measured by number of non-private methods and variables. CIS=WMCnp + VARSnp |
TCC/cls | Total cyclomatic complexity | 51.6 | 4.0 | 176.3 | >164.2 | Total cyclomatic complexity equals the total number of decisions + 1. TCC=Sum(CC)-Count(CC)+1 |
Procedure average | Name | Average | Min | Max | Outliers | Description |
LINES/proc | Physical lines | 31.6 | 10.0 | 86.5 | >61.1 | 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/proc | Logical lines | 30.4 | 9.9 | 86.0 | >58.2 | 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/proc | Logical lines of code | 19.5 | 8.7 | 52.6 | >35.5 | Code lines count. One logical line may be split on several physical lines by a line continuation character. |
LLOC'/proc | Logical lines of comment | 4.3 | 0.2 | 24.1 | >11.7 | 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/proc | Logical lines of whitespace | 6.6 | 0.2 | 57.1 | >13.6 | 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/proc | Meaningful comments | 3.5 | 0.3 | 11.3 | >10.2 | Full-line and end-of-line comments that have meaningful content. |
LLOCt/proc | Lines in call tree | 2,265 | 16 | 42,835 | >625 | 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/proc | Procedure parameters | 0.9 | 0.3 | 2.3 | >2.0 | Number of formal parameters defined in procedure header. |
VARSloc/proc | Local variables | 1.4 | 0.1 | 7.2 | >2.8 | Number of procedure local variables and arrays, excluding parameters. |
STMT/proc | Number of statements | 19.7 | 8.9 | 57.7 | >36.1 | Total number of all statements. |
STMTd/proc | Declarative statements | 3.3 | 2.1 | 9.0 | >4.8 | Number of declarative statements, which are: procedure headers, variable and constant declarations, all statements outside procedures. |
STMTx/proc | Executable statements | 16.4 | 6.4 | 48.7 | >29.5 | Number of executable statements. A statement is executable if it is not declarative. Executable statements can only exist within procedures. STMTx=STMT-STMTd |
STMTc/proc | Control statements | 6.7 | 2.5 | 22.9 | >11.9 | Number of control statements. A control statement is an executable statement that can alter the order in which statements are executed. |
STMTnc/proc | Non-control statements | 9.7 | 3.9 | 30.8 | >17.2 | Number of non-control statements, which are executable statements that are neither control nor declarative statements. STMTnc=STMTx-STMTc |
XQT/proc | Executability | 63% | 47% | 76% | <49% | 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/proc | Control density | 28% | 13% | 48% | - | 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/proc | Global I/O | 1.8 | 0.6 | 6.4 | >3.4 | Number of global and module-level variables accessed by a procedure. |
IOp/proc | Parameter I/O | 1.1 | 0.2 | 2.7 | - | Number of parameters used or returned by a procedure. The function return value counts as one parameter (output parameter). |
IOvars/proc | Input and output variables | 2.9 | 0.9 | 9.1 | >5.4 | Total number of input and output variables for a procedure, including parameters and function return value. IOvars=IOg+IOp |
IFIN/proc | Informational fan-in | 4.0 | 1.0 | 13.9 | >6.5 | Amount of data read. Procedures called + parameters read + global variables read. |
IFOUT/proc | Informational fan-out | 2.6 | 0.6 | 9.5 | >5.3 | Amount of data written. Procedures that call this procedure + ByRef parameters written to + global variables written to. |
IFIO/proc | Informational fan-in x fan-out | 23.3 | 1.3 | 203.4 | >46.6 | Fan-in multiplied by fan-out. IFIO=IFIN*IFOUT |
IC1/proc | Informational complexity | 4,850 | 45 | 63,112 | >3,364 | Fan-in multiplied by fan-out multiplied by procedure length (logical lines of code). IC1=IFIO*LLOC |
CC/proc | Cyclomatic complexity | 3.8 | 2.1 | 12.1 | >6.0 | McCabe cyclomatic complexity equals the number of execution paths through a procedure. Also known as V(C). |
CC2/proc | Cyclomatic complexity with Booleans | 4.2 | 2.2 | 14.7 | >6.5 | 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/proc | Cyclomatic complexity without Cases | 3.6 | 2.0 | 11.7 | >6.2 | CC3 equals the regular CC metric, but each Select Case block is counted as one branch, not as multiple branches. |
DCOND/proc | Depth of conditional nesting | 1.0 | 0.5 | 2.4 | >2.1 | Maximum number of nested conditional statements in a procedure. |
DLOOP/proc | Depth of looping | 0.2 | 0.1 | 0.5 | >0.4 | Maximum number of nested loop statements in a procedure. |
DCALLT/proc | Depth of call tree | 2.7 | 0.3 | 11.7 | >7.4 | Maximum number of nested procedure calls from a procedure. Recursive calls are not counted. |
SCALLT/proc | Size of call tree | 107.6 | 0.4 | 1835.4 | >50.5 | Number of distinct procedures in the call tree of a procedure, not counting the procedure itself. |
SC/proc | Structural complexity | 37.3 | 0.4 | 457.8 | >46.0 | 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/proc | Data complexity | 1.40 | 0.65 | 2.85 | >2.45 | 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/proc | System complexity | 38.67 | 1.55 | 459.00 | >47.28 | 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/proc | Length of procedure name | 14.6 | 8.7 | 18.7 | - | Length of procedure name in characters. |
SFIN/proc | Structural fan-in | 1.7 | 0.2 | 6.0 | >4.0 | Number of procedures that call a procedure. |
SFOUT/proc | Structural fan-out | 1.8 | 0.3 | 6.1 | >4.0 | Number of procedures that a procedure calls. |
Variable average | Name | Average | Min | Max | Outliers | Description |
READS/var | Reads from variable | 9.8 | 3.1 | 21.7 | >20.5 | Number of read instructions from variable. |
WRITES/var | Writes to variable | 3.8 | 1.4 | 11.9 | >6.1 | Number of write instructions to variable. |
RW/var | Reads and writes | 13.6 | 4.6 | 33.6 | >28.1 | Number of reads and writes. A single instruction may count both as a read and as a write. RW=READS+WRITES |
FLOWS/var | Data flows | 1126.4 | 12.9 | 23033.6 | >670.8 | Number of data flows into and out of a variable. FLOWS=READS*WRITES |
VARUSR/var | Variable users | 1.5 | 1.0 | 3.4 | >3.1 | Number of modules that use a variable. |
LENVgm/var | Length of variable name | 10.9 | 6.4 | 15.8 | - | Length of variable name in characters. |