File Complexity Overall
  • There are 215 files with units, with 81,007 lines of code.
    • 10 very complex files (McCabe index sum 251+; 32,878 lines of code)
    • 12 complex files (McCabe index sum 126-250; 10,652 lines of code)
    • 42 medium complex files (McCabe index sum 51-125; 18,932 lines of code)
    • 29 slightly complex files (McCabe index sum 26-50; 6,410 lines of code)
    • 122 simple files (McCabe index sum 1-25; 12,135 lines of code)
  • 109 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system40% | 13% | 23% | 7% | 14%
Legend:
251+
126-250
51-125
26-50
1-25


explore: grouped by folders | grouped by complexity
File Complexity per Extension
251+
126-250
51-125
26-50
1-25
ts41% | 12% | 21% | 9% | 14%
py40% | 12% | 32% | <1% | 13%
tsx0% | 54% | 0% | 45% | 0%
rs0% | 0% | 0% | 0% | 100%
cjs0% | 0% | 0% | 0% | 100%
js0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
sdk39% | 15% | 18% | 11% | 14%
plugins42% | 10% | 29% | 3% | 13%
github-action0% | 0% | 26% | 16% | 57%
evals0% | 0% | 0% | 0% | 100%
Most Complex Files (Top 50)

The McCabe index of a file grows with its size: per 100 lines tells a large but plain file from a dense one, and most complex unit whether the complexity sits in one unit or is spread over many.

File# lines# unitsMcCabe index
(sum)
per 100
lines
most complex
unit
cli.ts
in sdk/typescript/src
9523 248 1578 17 137
artifact-scan-draft.ts
in plugins/codex-security/mcp-app/src
2451 70 560 23 83
runtime.ts
in sdk/typescript/src
3155 116 531 17 24
finalize_scan_contract.py
in plugins/codex-security/scripts
2834 111 521 18 38
api.ts
in sdk/typescript/src
4832 116 470 10 51
workbench_db.py
in plugins/codex-security/scripts
3052 82 428 14 73
store.ts
in plugins/codex-security/mcp-app/src/deep-scan
872 70 328 38 24
server.ts
in plugins/codex-security/mcp-app
2633 66 284 11 109
workbench_saved_results.py
in plugins/codex-security/scripts
2414 55 284 12 25
coordinator.ts
in plugins/codex-security/mcp-app/src/deep-scan
1112 45 257 23 38
multiscan.ts
in sdk/typescript/src
1107 27 238 21 68
contract.ts
in sdk/typescript/src
1153 33 227 20 35
publish.ts
in sdk/typescript/src
1615 41 219 14 34
rank_preview.py
in plugins/codex-security/scripts
912 23 214 23 57
report_projection.py
in plugins/codex-security/scripts
936 34 206 22 46
executor.ts
in plugins/codex-security/mcp-app/src/deep-scan
791 28 175 22 24
targets.ts
in sdk/typescript/src
773 32 169 22 24
security-policy.ts
in sdk/typescript/src
1068 40 153 14 20
workbench_target.py
in plugins/codex-security/scripts
763 34 147 19 18
normalize-candidates.ts
in plugins/codex-security/mcp-app/src/helpers
480 19 136 28 37
patch-tui.tsx
in sdk/typescript/src
674 11 135 20 63
deduplication.ts
in sdk/typescript/src/deduplication
380 9 127 33 32
resolve-security-md.ts
in plugins/codex-security/mcp-app/src/helpers
413 16 119 29 24
permission-profile-preflight.ts
in plugins/codex-security/mcp-app/src/deep-scan
591 33 114 19 12
config.ts
in sdk/typescript/src
424 20 107 25 18
cost.ts
in sdk/typescript/src
638 11 102 16 62
deep_scan_workbench.py
in plugins/codex-security/scripts
1582 54 99 6 7
generate_rank_input.py
in plugins/codex-security/scripts
463 12 98 21 24
windows_scan_local_files.py
in plugins/codex-security/scripts
552 33 97 18 14
config_preflight.py
in plugins/codex-security/scripts
819 30 97 12 22
parent-sandbox.ts
in plugins/codex-security/mcp-app/src/deep-scan
230 27 94 41 15
publication-events.ts
in sdk/typescript/src
310 18 92 30 14
scan-comparison.ts
in sdk/typescript/src
1092 21 91 8 19
worker-runner.ts
in plugins/codex-security/mcp-app/src/deep-scan
771 24 89 12 29
scan-logs.ts
in sdk/typescript/src
270 14 87 32 21
finding_preview.py
in plugins/codex-security/scripts
430 7 84 20 47
scan-activity.ts
in sdk/typescript/src
390 9 82 21 30
artifact-io.ts
in plugins/codex-security/mcp-app/src
338 17 80 24 12
workbench_scan_usage.py
in plugins/codex-security/scripts
487 20 80 16 16
codex-review.ts
in sdk/typescript/src/deduplication
571 5 79 14 57
results.ts
in github-action/src
167 5 79 47 46
workbench_schema.py
in plugins/codex-security/scripts
635 15 75 12 16
finding-catalogue.ts
in sdk/typescript/src
177 13 75 42 10
workbench_validation.py
in plugins/codex-security/scripts
149 11 72 48 28
rank-pool.ts
in plugins/codex-security/mcp-app/src/helpers
321 10 66 21 25
scan-dashboard.ts
in sdk/typescript/src
1232 17 66 5 9
artifact-validation.ts
in plugins/codex-security/mcp-app/src/deep-scan
324 13 64 20 14
workbench_scan_history.py
in plugins/codex-security/scripts
1027 30 63 6 15
threat_model_projection.py
in plugins/codex-security/scripts
141 6 63 45 28
publication.ts
in sdk/typescript/src
393 13 63 16 19
About This Analysis
  • File complexity is the sum of the McCabe indexes (conditional complexity) of the units (methods, functions...) in a file.
  • Files are classified in five categories based on that sum: 1-25 (simple files), 26-50 (slightly complex files), 51-125 (medium complex files), 126-250 (complex files), 251+ (very complex files). The default bands are five times the unit complexity bands, as a file is a group of units.
  • Only main code files with units are classified. Files without units (languages without unit analysis, or files without functions) have no complexity to measure and are left out rather than counted as simple.
  • A very complex file holds many decisions, which often means it has too many responsibilities: a candidate to split, and a place where changes need more testing.
Learn more...