microsoft / PSDocs
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 795 units with 6,376 lines of code in units (59.9% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (95 lines of code)
    • 3 medium complex units (127 lines of code)
    • 59 simple units (1,129 lines of code)
    • 732 very simple units (5,025 lines of code)
0% | 1% | 1% | 17% | 78%
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
cs0% | 1% | 1% | 17% | 78%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/PSDocs/Processor0% | 28% | 0% | 16% | 55%
src/PSDocs/Common0% | 0% | 8% | 33% | 58%
src/PSDocs/Pipeline0% | 0% | 0% | 11% | 88%
src/PSDocs/Definitions0% | 0% | 0% | 22% | 77%
src/PSDocs/Models0% | 0% | 0% | 43% | 56%
src/PSDocs/Configuration0% | 0% | 0% | 14% | 85%
src/PSDocs/Commands0% | 0% | 0% | 12% | 87%
src/PSDocs/Runtime0% | 0% | 0% | 4% | 95%
src/PSDocs/Data0% | 0% | 0% | 0% | 100%
src/PSDocs.Benchmark0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private static void Table()
in src/PSDocs/Processor/Markdown/MarkdownProcessor.cs
95 34 2
private static bool GetField()
in src/PSDocs/Common/ObjectHelper.cs
53 20 4
internal static bool CompareNumeric()
in src/PSDocs/Common/ExpressionHelpers.cs
36 12 5
public int IndexOf()
in src/PSDocs/Common/ObjectHelper.cs
38 11 1
internal static bool Equal()
in src/PSDocs/Common/ExpressionHelpers.cs
14 10 5
private static PSObject ReadObject()
in src/PSDocs/Common/JsonConverters.cs
32 10 1
private bool Match()
in src/PSDocs/Pipeline/PathBuilder.cs
26 10 1
internal static bool TryInt()
in src/PSDocs/Common/ExpressionHelpers.cs
26 9 3
internal static bool TryLong()
in src/PSDocs/Common/ExpressionHelpers.cs
31 9 3
internal static bool TryDateTime()
in src/PSDocs/Common/ExpressionHelpers.cs
26 9 3
private IResource MapResource()
in src/PSDocs/Common/YamlConverters.cs
36 9 3
private void MapProperty()
in src/PSDocs/Common/YamlConverters.cs
26 9 4
private static void Node()
in src/PSDocs/Processor/Markdown/MarkdownProcessor.cs
31 9 2
private static void StartColumn()
in src/PSDocs/Processor/Markdown/MarkdownProcessor.cs
15 9 6
private static bool GetResult()
in src/PSDocs/Commands/InvokeDocumentCommand.cs
13 8 1
private static void ReadObject()
in src/PSDocs/Common/JsonConverters.cs
39 8 2
public override object ReadJson()
in src/PSDocs/Common/JsonConverters.cs
16 8 4
public bool Match()
in src/PSDocs/Models/DocumentFilter.cs
23 8 2
public bool TryMatchAA()
in src/PSDocs/Pipeline/PathBuilder.cs
32 8 2
internal static bool TryBool()
in src/PSDocs/Common/ExpressionHelpers.cs
21 7 3