File Complexity Overall
  • There are 125 files with units, with 28,873 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)
    • 12 medium complex files (McCabe index sum 51-125; 7,140 lines of code)
    • 9 slightly complex files (McCabe index sum 26-50; 2,321 lines of code)
    • 104 simple files (McCabe index sum 1-25; 19,412 lines of code)
  • 182 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 24% | 8% | 67%
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% | 24% | 8% | 67%
cjs0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
src0% | 0% | 26% | 8% | 65%
packages0% | 0% | 0% | 0% | 100%
scripts0% | 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
client.ts
in src
1601 32 123 8 24
file-store.ts
in src/internal
387 32 121 31 12
node.ts
in src/tools/agent-toolset
771 34 120 16 14
stringify.ts
in src/internal/qs
324 9 111 34 48
streaming.ts
in src/core
301 14 95 32 53
memories.ts
in src/tools/agent-toolset
733 22 81 11 17
middleware.ts
in src/lib
657 25 78 12 21
BetaToolRunner.ts
in src/lib/tools
649 23 77 12 10
node.ts
in src/tools/memory
308 14 67 22 18
skills.ts
in src/tools/agent-toolset
248 12 62 25 13
650 28 58 9 10
SessionToolRunner.ts
in src/lib/tools
511 10 54 11 30
utils.ts
in src/internal/qs
215 10 50 23 24
worker.ts
in src/lib/environments
469 14 49 10 9
604 27 47 8 6
mcp.ts
in src/helpers/beta
322 14 42 13 8
types.ts
in src/lib/credentials
209 6 41 20 9
middleware.ts
in src/core
148 7 37 25 10
credential-chain.ts
in src/lib/credentials
194 6 33 17 9
accumulate.ts
in src/lib/sessions
55 3 30 55 10
105 3 27 26 25
AWS_restJson1.ts
in packages/bedrock-sdk/src
264 18 24 9 2
fs-util.ts
in src/tools/agent-toolset
119 6 24 20 10
error.ts
in src/core
116 5 24 21 11
uploads.ts
in src/internal
174 3 24 14 17
postprocess-files.cjs
in scripts/utils
102 3 23 23 12
log.ts
in src/internal/utils
138 10 22 16 3
client.ts
in packages/vertex-sdk/src
178 9 20 11 11
node.browser.ts
in src/tools/agent-toolset
105 18 19 18 2
shims.ts
in src/internal
74 9 19 26 4
70 5 19 27 11
deployments.ts
in src/resources/beta
418 8 16 4 2
line.ts
in src/internal/decoders
90 3 16 18 11
pagination.ts
in src/core
281 9 15 5 3
versions.ts
in src/resources/beta/skills
156 5 15 10 3
files.ts
in src/resources/beta
160 5 15 9 3
BetaToolRunnerStream.ts
in src/lib/internal
137 6 15 11 6
user-oauth.ts
in src/lib/credentials
117 2 15 13 14
token-cache.ts
in src/lib/credentials
77 5 15 19 6
batches.ts
in src/resources/beta/messages
255 7 14 5 3
credentials.ts
in src/resources/beta/vaults
413 7 14 3 2
batches.ts
in src/resources/messages
204 7 14 7 3
detect-platform.ts
in src/internal
152 2 14 9 8
work.ts
in src/resources/beta/environments
273 8 13 5 2
to-file.ts
in src/internal
89 1 13 15 13
parse.ts
in src/internal
70 2 13 19 9
backoff.ts
in src/internal/utils
19 6 13 68 4
streaming.ts
in packages/bedrock-sdk/src/core
83 2 12 14 8
client.ts
in packages/aws-sdk/src
201 9 12 6 3
client.ts
in packages/google-cloud-sdk/src
196 8 12 6 4
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...