microsoft / ajaxmin
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 2,418 units with 40,823 lines of code in units (80.3% of code).
    • 9 very complex units (3,638 lines of code)
    • 40 complex units (4,482 lines of code)
    • 161 medium complex units (9,932 lines of code)
    • 227 simple units (6,986 lines of code)
    • 1,981 very simple units (15,785 lines of code)
8% | 10% | 24% | 17% | 38%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
cs8% | 10% | 24% | 17% | 38%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
AjaxMinDll10% | 11% | 24% | 18% | 35%
AjaxMin8% | 19% | 29% | 18% | 23%
AjaxMinTask0% | 9% | 48% | 26% | 14%
DllUnitTest0% | 0% | 22% | 9% | 68%
JSUnitTest0% | 0% | 0% | 0% | 100%
CssUnitTest0% | 0% | 0% | 0% | 100%
AjaxMinDll20050% | 0% | 0% | 0% | 100%
Deployment0% | 0% | 0% | 0% | 100%
AjaxMinStub0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public void Parse()
in AjaxMinDll/SwitchParser.cs
1197 258 1
public Context ScanNextToken()
in AjaxMinDll/JavaScript/jsscanner.cs
594 192 0
public override void Visit()
in AjaxMinDll/JavaScript/AnalyzeNodeVisitor.cs
595 149 1
private bool Append()
in AjaxMinDll/Css/CssParser.cs
328 99 2
private void ScanString()
in AjaxMinDll/JavaScript/jsscanner.cs
239 63 1
private void OnUnknownParameter()
in AjaxMin/MainClass.cs
226 62 2
public override void Visit()
in AjaxMinDll/JavaScript/AnalyzeNodeVisitor.cs
205 60 1
private Parsed ParseTerm()
in AjaxMinDll/Css/CssParser.cs
197 51 1
public static string OperatorString()
in AjaxMinDll/JavaScript/OutputVisitor.cs
57 51 1
private AstNode ParseLeftHandSideExpression()
in AjaxMinDll/JavaScript/jsparser.cs
276 48 1
public override void Visit()
in AjaxMinDll/JavaScript/AnalyzeNodeVisitor.cs
152 47 1
private JSToken ScanNumber()
in AjaxMinDll/JavaScript/jsscanner.cs
121 47 1
public override void Visit()
in AjaxMinDll/JavaScript/AnalyzeNodeVisitor.cs
136 45 1
public CssToken NextToken()
in AjaxMinDll/Css/CssScanner.cs
128 44 0
private void EvalToTheLeft()
in AjaxMinDll/JavaScript/EvaluateLiteralVisitor.cs
109 44 4
private void ConvertBinaryOperator()
in AjaxMinDll/JavaScript/LogicalNotVisitor.cs
74 44 1
private void MeasureBinaryOperator()
in AjaxMinDll/JavaScript/LogicalNotVisitor.cs
66 43 1
public override PrimitiveType FindPrimitiveType()
in AjaxMinDll/JavaScript/binaryop.cs
65 43 0
private void ProcessScope()
in AjaxMin/XmlScopeReport.cs
157 42 1
private CssToken ScanNum()
in AjaxMinDll/Css/CssScanner.cs
102 42 0