File Complexity Overall
  • There are 174 files with units, with 20,716 lines of code.
    • 0 very complex files (McCabe index sum 251+; 0 lines of code)
    • 1 complex files (McCabe index sum 126-250; 524 lines of code)
    • 10 medium complex files (McCabe index sum 51-125; 3,537 lines of code)
    • 27 slightly complex files (McCabe index sum 26-50; 6,468 lines of code)
    • 136 simple files (McCabe index sum 1-25; 10,187 lines of code)
  • 148 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 2% | 17% | 31% | 49%
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
ts0% | 7% | 13% | 32% | 45%
py0% | 0% | 20% | 31% | 47%
tsx0% | 0% | 12% | 28% | 58%
js0% | 0% | 53% | 28% | 17%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
managed-agents0% | 4% | 13% | 28% | 53%
browser-use-demo0% | 0% | 55% | 10% | 34%
computer-use-demo0% | 0% | 29% | 40% | 29%
computer-use-best-practices0% | 0% | 18% | 45% | 36%
financial-data-analyst0% | 0% | 0% | 60% | 39%
autonomous-coding0% | 0% | 0% | 50% | 49%
agents0% | 0% | 0% | 0% | 100%
customer-support-agent0% | 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
reducer.ts
in managed-agents/assistant-ui/lib/managed-agents
524 24 148 28 44
browser_dom_script.js
in browser-use-demo/browser_use_demo/browser_tool_utils
346 11 123 36 40
streamlit.py
in browser-use-demo/browser_use_demo
465 25 92 20 21
session-controller.ts
in managed-agents/assistant-ui/lib/managed-agents
343 19 85 25 16
managed-agents.ts
in managed-agents/chat-sdk/src
356 13 76 21 37
managed-agents.ts
in managed-agents/mcp-server-typescript/src
207 16 70 34 14
loop.py
in computer-use-best-practices/computer_use
410 19 69 17 9
tool-rail.tsx
in managed-agents/roadtrip-planner/src/components
247 11 67 27 13
message_renderer.py
in browser-use-demo/browser_use_demo
132 14 66 50 15
diff-viewer.tsx
in managed-agents/assistant-ui/components/assistant-ui
529 12 57 11 11
streamlit.py
in computer-use-demo/computer_use_demo
502 15 54 11 18
sidebar.tsx
in managed-agents/assistant-ui/components/ui
631 23 49 8 10
security.py
in autonomous-coding
184 6 48 26 12
oauth.ts
in managed-agents/linear/src
209 16 46 22 7
webhook.ts
in managed-agents/self-hosted-sandboxes/vercel/api
348 14 44 13 12
build_manifest.py
in managed-agents/knowledge-wiki
119 1 42 35 42
transcript.ts
in managed-agents/roadtrip-planner/src/lib
229 7 42 18 28
computer.py
in computer-use-best-practices/computer_use/tools
340 14 42 12 8
constants.py
in computer-use-best-practices
193 6 40 21 21
managed-agents-webhook.ts
in managed-agents/linear/src
167 7 37 22 14
managed-agents-webhook.ts
in managed-agents/slack/src
155 6 36 23 13
browser.py
in computer-use-best-practices/computer_use/tools
215 6 36 17 22
route.ts
in financial-data-analyst/app/api/finance
400 3 35 9 28
editor.py
in computer-use-best-practices/computer_use/tools
136 8 35 26 11
browser_form_input_script.js
in browser-use-demo/browser_use_demo/browser_tool_utils
184 1 35 19 35
index.ts
in managed-agents/self-hosted-sandboxes/cloudflare-containers/src
187 5 33 18 14
use-managed-agent-session.ts
in managed-agents/roadtrip-planner/src/lib
169 3 33 20 31
sessions.ts
in managed-agents/chat-sdk/src
129 9 32 25 13
index.ts
in managed-agents/self-hosted-sandboxes/cloudflare-worker/src
167 5 31 19 12
ChartRenderer.tsx
in financial-data-analyst/components
394 5 29 7 8
computer.py
in computer-use-demo/computer_use_demo/tools
480 10 29 6 9
app.tsx
in managed-agents/chat-sdk/web
313 5 29 9 15
render.py
in computer-use-best-practices/computer_use
67 15 29 43 5
edit.py
in computer-use-demo/computer_use_demo/tools
222 8 28 13 11
image.tsx
in managed-agents/assistant-ui/components/assistant-ui
412 8 28 7 10
fetch_data_room.py
in managed-agents/knowledge-wiki
98 8 28 29 7
base.py
in computer-use-best-practices/computer_use/tools
80 9 28 35 8
oauth_setup.py
in managed-agents/sentry
240 9 27 11 10
tool-fallback.tsx
in managed-agents/assistant-ui/components/assistant-ui
529 8 25 5 7
file.tsx
in managed-agents/assistant-ui/components/assistant-ui
214 8 23 11 7
page.tsx
in managed-agents/roadtrip-planner/src/app
372 5 23 6 8
agent.ts
in managed-agents/linear/src
129 8 22 17 7
managed_agents.py
in managed-agents/sentry
60 6 22 37 7
preflight.py
in computer-use-best-practices/computer_use
106 7 21 20 12
reasoning.tsx
in managed-agents/assistant-ui/components/assistant-ui
324 5 20 6 9
tools.ts
in managed-agents/self-hosted-sandboxes/cloudflare-worker/src
88 3 20 23 16
route.ts
in managed-agents/roadtrip-planner/src/app/api/session
68 3 20 29 15
formatters.py
in computer-use-best-practices/computer_use
57 5 20 35 10
scope.ts
in managed-agents/mcp-server-typescript/src
52 6 19 37 6
batch.py
in computer-use-best-practices/computer_use/tools
70 8 18 26 8
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...