openai / openai-ruby
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 5,318 units with 25,514 lines of code in units (16.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 5 medium complex units (224 lines of code)
    • 17 simple units (681 lines of code)
    • 5,296 very simple units (24,609 lines of code)
0% | 0% | <1% | 2% | 96%
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
rb0% | 0% | 3% | 11% | 85%
rbi0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib0% | 0% | 3% | 11% | 85%
rbi0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
54 22 2
40 17 2
55 15 0
55 12 0
20 11 0
80 10 0
24 9 2
53 9 1
78 9 3
56 8 4
21 8 3
117 8 1
35 7 0
47 7 1
22 7 2
19 7 2
18 7 2
18 7 2
15 7 1
46 7 0
12 6 2
20 6 1
28 5 2
19 5 2
11 5 2
11 5 1
21 5 2
11 5 2
13 5 1
58 5 1
12 5 1
30 5 1
5 4 1
11 4 1
23 4 3
12 4 1
9 4 1
17 4 2
17 4 2
12 4 0
34 4 0
6 4 1
42 3 3
11 3 1
11 3 1
3 3 1
24 3 2
6 3 1
13 3 0
13 3 1