openai / openai-cua-sample-app
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 299 units with 4,720 lines of code in units (52.5% of code).
    • 1 very complex units (514 lines of code)
    • 3 complex units (367 lines of code)
    • 5 medium complex units (488 lines of code)
    • 13 simple units (561 lines of code)
    • 277 very simple units (2,790 lines of code)
10% | 7% | 10% | 11% | 59%
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
ts14% | 4% | 8% | 12% | 60%
tsx0% | 30% | 25% | 0% | 44%
js0% | 0% | 0% | 24% | 75%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
apps25% | 10% | 21% | 9% | 32%
packages0% | 6% | 2% | 11% | 78%
labs0% | 0% | 0% | 24% | 75%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
514 63 4
205 33 4
58 32 1
104 29 2
170 22 17
47 21 1
181 17 2
55 14 2
35 11 1
47 10 1
67 9 3
25 9 0
18 7 1
25 7 1
18 7 1
129 7 1
79 7 2
34 7 2
23 7 2
25 6 0
26 6 2
45 6 1
22 5 3
9 5 1
21 5 0
36 5 1
25 5 1
25 4 3
38 4 8
12 4 1
7 4 1
47 4 3
13 4 1
39 4 2
10 4 0
11 4 2
42 4 1
9 3 1
8 3 0
8 3 0
12 3 0
10 3 1
8 3 1
9 3 1
10 3 2
10 3 2
7 3 2
12 3 1
13 3 3
20 3 2