File Complexity Overall
  • There are 1,997 files with units, with 112,600 lines of code.
    • 1 very complex files (McCabe index sum 251+; 1,178 lines of code)
    • 2 complex files (McCabe index sum 126-250; 1,078 lines of code)
    • 11 medium complex files (McCabe index sum 51-125; 2,855 lines of code)
    • 32 slightly complex files (McCabe index sum 26-50; 5,281 lines of code)
    • 1,951 simple files (McCabe index sum 1-25; 102,208 lines of code)
  • 986 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system1% | <1% | 2% | 4% | 90%
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
php1% | <1% | 2% | 4% | 90%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
src1% | <1% | 2% | 4% | 90%
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
RefusalFallbackMiddleware.php
in src/Lib/Middleware
1178 25 270 23 138
Util.php
in src/Core
535 30 155 29 12
BetaToolRunner.php
in src/Lib/Tools
543 28 128 24 17
BedrockMiddleware.php
in src/Bedrock
312 38 80 26 13
BaseClient.php
in src/Core
308 15 75 24 26
CredentialsFile.php
in src/Lib/Credentials
225 11 68 30 12
BetaBrowserToolsetConfigs.php
in src/Beta/Messages
321 33 64 20 32
320 33 64 20 32
MessageAccumulator.php
in src/Lib/Streaming
225 15 57 25 10
MessageCreateParams.php
in src/Beta/Messages
288 30 55 19 26
89 1 55 62 55
SchemaInference.php
in src/Lib/Helpers
180 5 55 31 38
BetaMcp.php
in src/Lib/Tools
297 11 54 18 13
Params.php
in src/Beta/Messages/Batches/BatchCreateParams/Request
290 28 51 18 24
AnalyticsSingleDayActivitySummary.php
in src/Beta/Organization/Analytics
301 31 47 16 17
StructuredOutput.php
in src/Lib/Helpers
149 6 47 32 16
Conversion.php
in src/Core
173 3 42 24 26
RefreshTokenProvider.php
in src/Lib/Credentials
187 9 41 22 10
UserCostReportListParams.php
in src/Beta/Organization/Analytics/UserCostReport
202 21 39 19 19
UserUsageReportListParams.php
in src/Beta/Organization/Analytics/UserUsageReport
202 21 39 19 19
209 22 39 19 18
Params.php
in src/Messages/Batches/BatchCreateParams/Request
216 21 37 17 17
BetaComputerToolsetConfigs.php
in src/Beta/Messages
185 19 36 19 18
183 19 36 20 18
Client.php
in src/Vertex
179 18 36 20 7
SdkModel.php
in src/Core/Concerns
151 15 35 23 6
UsageReportListParams.php
in src/Beta/Organization/Analytics/UsageReport
173 18 33 19 16
CostReportListParams.php
in src/Beta/Organization/Analytics/CostReport
173 18 33 19 16
MessageCountTokensParams.php
in src/Beta/Messages
177 18 32 18 15
SessionListParams.php
in src/Beta/Sessions
159 17 32 20 16
153 15 30 20 15
DefaultCredentials.php
in src/Lib/Credentials
93 4 30 32 10
AwsAuth.php
in src/Aws
146 7 30 21 13
BetaWebFetchTool20260318.php
in src/Beta/Messages
149 16 28 19 13
149 16 28 19 13
ModelOf.php
in src/Core/Conversion
102 4 28 27 14
AnalyticsCoworkMetrics.php
in src/Beta/Organization/Analytics
177 19 27 15 9
Client.php
in src/Bedrock
152 11 27 18 5
180 9 27 15 10
BetaWebFetchTool20260309.php
in src/Beta/Messages
138 15 26 19 12
AgentUpdateParams.php
in src/Beta/Agents
140 14 26 19 13
MemoryVersionListParams.php
in src/Beta/MemoryStores/MemoryVersions
132 14 26 20 13
DeploymentUpdateParams.php
in src/Beta/Deployments
140 14 26 19 13
Client.php
in src/Foundry
175 10 26 15 7
138 15 26 19 12
98 5 26 27 11
PluginListParams.php
in src/Beta/Organization/Plugins
122 13 24 20 12
BetaWebFetchTool20260209.php
in src/Beta/Messages
129 14 24 19 11
BetaWebFetchTool20250910.php
in src/Beta/Messages
129 14 24 19 11
DeploymentRunListParams.php
in src/Beta/DeploymentRuns
122 13 24 20 12
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...