File Complexity Overall
  • There are 33 files with units, with 1,463 lines of code.
    • 0 very complex files (McCabe index sum 251+; 0 lines of code)
    • 0 complex files (McCabe index sum 126-250; 0 lines of code)
    • 0 medium complex files (McCabe index sum 51-125; 0 lines of code)
    • 1 slightly complex files (McCabe index sum 26-50; 292 lines of code)
    • 32 simple files (McCabe index sum 1-25; 1,171 lines of code)
  • 25 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 0% | 19% | 80%
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% | 0% | 0% | 36% | 63%
tsx0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
lib0% | 0% | 0% | 98% | 1%
components0% | 0% | 0% | 0% | 100%
app0% | 0% | 0% | 0% | 100%
config0% | 0% | 0% | 0% | 100%
Most Complex Files (Top 33)

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
292 1 41 14 41
ToolCall.tsx
in components
111 3 12 11 7
demoData.ts
in config
149 7 7 5 1
route.ts
in app/api/turn_response
50 3 6 12 3
68 3 5 7 2
route.ts
in app/api/vector_stores/list_files
15 1 3 20 3
route.ts
in app/api/vector_stores/retrieve_store
15 1 3 20 3
UserView.tsx
in components
37 1 3 8 3
Chat.tsx
in components
237 2 3 1 2
route.ts
in app/api/vector_stores/create_store
15 1 2 13 2
route.ts
in app/api/vector_stores/add_file
18 1 2 11 2
route.ts
in app/api/vector_stores/upload_file
19 1 2 11 2
route.ts
in app/api/vector_stores/get_file
17 1 2 12 2
route.ts
in app/api/tickets/create
17 1 2 12 2
route.ts
in app/api/complaints/create
17 1 2 12 2
route.ts
in app/api/list_files
15 1 2 13 2
route.ts
in app/api/vouchers/create
14 1 2 14 2
AgentView.tsx
in components
64 1 2 3 2
page.tsx
in app/kb
13 1 1 8 1
page.tsx
in app/faq
9 1 1 11 1
37 1 1 3 1
route.ts
in app/api/users/[user_id]/reset_password
17 1 1 6 1
route.ts
in app/api/users/[user_id]/order_history
16 1 1 6 1
route.ts
in app/api/users/[user_id]/update_info
20 1 1 5 1
route.ts
in app/api/orders/[order_id]/cancel
16 1 1 6 1
route.ts
in app/api/orders/[order_id]/create_refund
19 1 1 5 1
route.ts
in app/api/orders/[order_id]/send_replacement
18 1 1 6 1
route.ts
in app/api/orders/[order_id]
19 1 1 5 1
route.ts
in app/api/orders/[order_id]/create_return
19 1 1 5 1
ContextPanel.tsx
in components
25 1 1 4 1
22 1 1 5 1
CustomerDetails.tsx
in components
38 1 1 3 1
utils.ts
in lib
5 1 1 20 1
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...