openai / snap-o
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 706 units with 7,416 lines of code in units (30.7% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (284 lines of code)
    • 10 medium complex units (402 lines of code)
    • 51 simple units (1,297 lines of code)
    • 644 very simple units (5,433 lines of code)
0% | 3% | 5% | 17% | 73%
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
ts0% | 11% | 9% | 19% | 59%
tsx0% | 0% | 25% | 37% | 36%
swift0% | 0% | 0% | 15% | 84%
kt0% | 0% | 0% | 4% | 95%
kts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
snapo-network-inspector-web0% | 9% | 12% | 23% | 54%
snapo-app-mac0% | 0% | 0% | 15% | 84%
snapo-link-android0% | 0% | 0% | 4% | 95%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
284 26 0
45 16 1
66 16 7
34 16 1
43 16 1
34 16 1
19 15 2
33 14 1
35 14 3
76 13 6
17 13 1
41 10 5
93 10 0
33 10 3
39 10 1
21 10 2
21 9 0
51 9 4
9 9 1
36 9 0
36 8 3
29 8 2
18 8 1
11 8 1
13 8 2
25 8 4
13 8 1
42 8 6
73 8 3
27 7 2
17 7 1
16 7 1
13 7 2
37 7 2
6 7 1
31 7 3
10 7 1
26 7 1
20 7 1
12 7 1
16 7 1
11 7 1
83 6 4
38 6 1
15 6 1
25 6 0
32 6 1
16 6 1
55 6 0
15 6 2