Linux / Security
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,828 units with 53,075 lines of code in units (75.1% of code).
    • 7 very complex units (1,676 lines of code)
    • 34 complex units (4,141 lines of code)
    • 204 medium complex units (11,333 lines of code)
    • 403 simple units (12,995 lines of code)
    • 2,180 very simple units (22,930 lines of code)
3% | 7% | 21% | 24% | 43%
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
c3% | 7% | 21% | 24% | 42%
h0% | 0% | 0% | 6% | 93%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
integrity11% | 5% | 20% | 26% | 36%
selinux3% | 7% | 23% | 25% | 40%
tomoyo5% | 10% | 25% | 24% | 34%
keys0% | 13% | 24% | 24% | 37%
ROOT0% | 12% | 14% | 9% | 63%
apparmor0% | 4% | 14% | 27% | 54%
smack0% | 2% | 26% | 23% | 46%
landlock0% | 0% | 14% | 21% | 63%
safesetid0% | 0% | 26% | 39% | 34%
yama0% | 0% | 12% | 38% | 49%
loadpin0% | 0% | 0% | 63% | 36%
lockdown0% | 0% | 0% | 23% | 76%
bpf0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
339 144 2
419 142 2
150 69 3
262 64 2
186 63 4
142 59 7
178 54 2
94 49 8
107 47 4
183 44 2
157 44 3
174 42 3
119 41 3
85 40 1
178 39 4
136 38 3
86 38 7
125 37 3
170 37 5
153 36 8
205 35 2
148 35 4
71 34 2
137 33 1
87 31 4
103 31 4
116 31 3
82 31 5
104 30 5
135 30 2
120 30 2
107 30 2
142 29 1
133 29 7
144 29 4
53 28 2
112 28 2
99 27 5
93 27 3
84 26 3
99 26 2
129 25 2
87 25 5
98 25 2
104 25 3
82 24 6
114 24 4
45 23 2
89 22 3
79 22 1