openai / openai-cli
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 197 units with 3,059 lines of code in units (77.2% of code).
    • 1 very complex units (181 lines of code)
    • 1 complex units (157 lines of code)
    • 16 medium complex units (768 lines of code)
    • 35 simple units (885 lines of code)
    • 144 very simple units (1,068 lines of code)
5% | 5% | 25% | 28% | 34%
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
go5% | 5% | 25% | 28% | 34%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
pkg17% | 14% | 22% | 22% | 22%
internal0% | 0% | 26% | 32% | 41%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
181 54 5
157 47 3
69 23 2
59 20 1
60 20 3
80 19 3
42 17 1
50 16 1
29 15 2
33 14 1
47 14 2
48 14 2
48 14 1
42 13 1
48 13 1
30 13 2
47 13 1
36 12 2
37 10 2
28 10 3
26 10 1
33 10 1
24 10 1
31 9 3
40 9 1
33 9 2
34 9 2
25 9 1
32 8 2
17 8 2
27 8 1
21 8 2
29 8 1
18 8 1
22 8 1
27 8 1
28 8 1
18 8 1
9 8 1
21 8 1
28 7 1
45 7 1
9 7 1
21 7 1
21 7 1
25 6 1
17 6 1
18 6 3
34 6 4
20 6 1