openai / codex
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 13,193 units with 208,976 lines of code in units (37.8% of code).
    • 2 very complex units (559 lines of code)
    • 17 complex units (2,840 lines of code)
    • 185 medium complex units (12,354 lines of code)
    • 623 simple units (23,634 lines of code)
    • 12,366 very simple units (169,589 lines of code)
<1% | 1% | 5% | 11% | 81%
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
rs<1% | 1% | 5% | 11% | 82%
py0% | 7% | 16% | 20% | 55%
ts0% | 0% | 44% | 9% | 45%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
codex-rs<1% | 1% | 5% | 11% | 81%
.codex0% | 14% | 21% | 24% | 40%
sdk0% | 0% | 19% | 16% | 64%
scripts0% | 0% | 19% | 10% | 70%
codex-cli0% | 0% | 56% | 12% | 30%
tools0% | 0% | 25% | 12% | 61%
.github0% | 0% | 3% | 40% | 55%
bazel0% | 0% | 0% | 27% | 72%
.devcontainer0% | 0% | 0% | 63% | 36%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
426 60 1
133 52 2
230 46 2
299 45 4
201 44 0
223 41 2
105 40 2
63 37 4
124 32 1
114 31 1
137 30 1
185 30 0
73 29 1
142 29 2
37 29 2
245 29 3
316 28 0
124 26 4
222 26 3
205 25 4
63 23 2
47 23 3
118 23 2
141 23 1
62 23 2
148 23 2
55 22 1
170 22 6
44 21 1
92 21 1
80 21 1
153 21 3
203 21 2
110 21 3
23 21 1
107 20 0
70 20 1
206 20 3
90 20 3
121 19 3
75 19 1
49 19 1
87 19 3
30 18 1
75 18 2
66 18 1
54 18 1
127 18 2
97 18 2
112 18 6