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 15,934 units with 264,985 lines of code in units (35.2% of code).
    • 2 very complex units (591 lines of code)
    • 29 complex units (4,787 lines of code)
    • 271 medium complex units (19,714 lines of code)
    • 797 simple units (30,000 lines of code)
    • 14,835 very simple units (209,893 lines of code)
<1% | 1% | 7% | 11% | 79%
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% | 6% | 11% | 80%
py0% | 10% | 19% | 17% | 52%
ts0% | 0% | 44% | 9% | 46%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
sandboxing & policy2% | 2% | 6% | 14% | 73%
extensibility (MCP, plugins, skills, hooks)<1% | <1% | 9% | 11% | 78%
TUI frontend0% | 2% | 8% | 11% | 77%
repo tooling & CI0% | 10% | 21% | 17% | 50%
core engine0% | 1% | 7% | 12% | 78%
exec-server (sandboxed executor)0% | 5% | 2% | 5% | 87%
app-server API0% | <1% | 3% | 6% | 89%
extensions (ext/*)0% | 2% | 9% | 16% | 71%
CLI & headless frontends0% | 1% | 8% | 16% | 73%
configuration0% | 1% | 6% | 5% | 86%
code-mode (V8 runtime)0% | 1% | 6% | 6% | 85%
persistence (rollout, state, thread-store)0% | 0% | 7% | 8% | 84%
sdk (TypeScript & Python)0% | 0% | 19% | 16% | 64%
protocol (shared vocabulary)0% | 0% | 5% | 5% | 89%
shared infrastructure (utils & leaf crates)0% | 0% | 3% | 9% | 86%
model backends & API clients0% | 0% | 1% | 9% | 88%
auth & identity0% | 0% | 2% | 11% | 85%
by-layer logical decomposition
51+
26-50
11-25
6-10
1-5
services (config, persistence, sandbox, exec-server, models, auth)<1% | 1% | 5% | 10% | 81%
API server & extensions<1% | 1% | 6% | 9% | 82%
frontends0% | 2% | 8% | 12% | 76%
engine0% | 1% | 7% | 11% | 79%
vocabulary & utilities0% | 0% | 3% | 8% | 87%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
444 69 1
147 54 2
327 50 4
219 50 0
238 49 2
132 41 3
194 41 2
103 40 2
294 39 3
134 37 1
63 37 4
147 37 1
257 34 1
133 33 2
100 32 2
190 31 0
142 31 3
150 30 3
216 30 1
73 29 1
37 29 2
250 29 2
235 29 3
80 29 2
132 28 2
316 28 0
84 27 2
212 27 4
94 27 1
107 26 2
128 26 2
331 25 1
193 25 2
154 24 2
135 23 3
62 23 2
22 23 1
118 23 2
141 23 1
47 23 3
63 23 2
77 23 1
119 22 2
387 22 1
170 22 6
92 22 4
126 22 6
321 22 5
55 22 1
62 22 2