microsoft / PowerShell-DSC-for-Linux
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 8,679 units with 123,579 lines of code in units (53.1% of code).
    • 12 very complex units (3,184 lines of code)
    • 65 complex units (7,154 lines of code)
    • 349 medium complex units (19,600 lines of code)
    • 679 simple units (21,578 lines of code)
    • 7,574 very simple units (72,063 lines of code)
2% | 5% | 15% | 17% | 58%
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
c6% | 10% | 24% | 20% | 38%
py1% | 7% | 21% | 25% | 44%
rb6% | 1% | 14% | 23% | 54%
cs0% | 0% | 31% | 37% | 31%
cpp0% | 0% | 1% | 13% | 85%
h0% | 0% | 0% | 0% | 100%
hpp0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
LCM5% | 9% | 24% | 19% | 42%
Providers1% | 3% | 11% | 16% | 66%
ext0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
533 92 4
386 78 5
229 73 3
229 73 3
187 69 1
231 62 7
197 59 2
197 59 2
197 59 2
194 55 1
302 53 2
302 53 2
120 46 4
68 46 8
68 46 8
68 46 8
164 45 2
242 42 5
171 42 1
245 41 1
256 41 2
169 40 1
134 39 5
66 39 2
111 38 4
185 38 3
212 38 10
102 37 1
102 37 1
58 37 1
108 36 1
76 35 4
139 35 3
78 35 2
54 35 1
78 35 2
54 35 1
78 35 2
96 34 6
86 34 5
96 34 6
79 34 5
96 34 6
79 34 5
89 34 1
71 33 1
102 33 3
76 33 2
88 33 1
88 33 1