openai / openai-node
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 517 units with 6,790 lines of code in units (19.6% of code).
    • 2 very complex units (601 lines of code)
    • 8 complex units (781 lines of code)
    • 21 medium complex units (1,156 lines of code)
    • 47 simple units (1,241 lines of code)
    • 439 very simple units (3,011 lines of code)
8% | 11% | 17% | 18% | 44%
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
ts9% | 11% | 17% | 17% | 44%
cjs0% | 0% | 0% | 58% | 41%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src6% | 13% | 17% | 18% | 44%
scripts22% | 0% | 14% | 19% | 43%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
366 113 2
235 67 1
136 48 4
138 39 2
72 36 1
133 35 4
70 35 1
53 30 0
61 28 2
118 27 1
65 24 5
59 24 2
92 23 3
53 22 2
72 17 4
145 16 3
65 16 2
15 16 1
34 15 1
90 13 2
46 13 2
55 13 1
34 12 2
43 12 2
72 12 1
52 11 2
22 11 1
36 11 4
37 11 3
47 11 2
22 11 3
42 10 2
28 10 3
40 10 0
36 10 3
23 10 0
56 10 0
52 10 1
46 9 0
28 9 4
31 9 1
20 9 3
23 9 2
44 8 0
23 8 0
25 8 2
55 8 2
19 8 3
16 8 2
51 8 2