File Complexity Overall
  • There are 377 files with units, with 54,352 lines of code.
    • 0 very complex files (McCabe index sum 251+; 0 lines of code)
    • 2 complex files (McCabe index sum 126-250; 1,597 lines of code)
    • 11 medium complex files (McCabe index sum 51-125; 4,334 lines of code)
    • 37 slightly complex files (McCabe index sum 26-50; 10,621 lines of code)
    • 327 simple files (McCabe index sum 1-25; 37,800 lines of code)
  • 172 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 2% | 7% | 19% | 69%
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% | 19% | 32% | 12% | 35%
tsx0% | 30% | 19% | 9% | 40%
swift0% | 0% | 2% | 22% | 74%
kt0% | 0% | 9% | 9% | 80%
py0% | 0% | 55% | 0% | 44%
java0% | 0% | 25% | 53% | 21%
kts0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
tools0% | 13% | 17% | 12% | 57%
app-macos0% | 0% | 2% | 22% | 74%
release0% | 0% | 100% | 0% | 0%
tool-sdk0% | 0% | 29% | 0% | 70%
tool-reader0% | 0% | 35% | 0% | 65%
device-helper0% | 0% | 0% | 91% | 8%
build-logic0% | 0% | 0% | 0% | 100%
ROOT0% | 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
cdp.ts
in tools/network/frontend/src/network
808 57 147 18 16
TweaksToolApp.tsx
in tools/tweaks/frontend/src/features/tweaks-tool
789 22 139 18 46
exporters.ts
in tools/network/frontend/src/network
382 42 117 31 13
PayloadView.tsx
in tools/network/frontend/src/features/network-tool/components
502 20 100 20 16
487 21 83 17 14
payload.ts
in tools/network/frontend/src/network
218 21 77 35 7
CapturePaneTests.swift
in app-macos/StandaloneTests/CapturePane
660 37 70 11 5
index.ts
in tool-sdk/host/src
374 20 69 18 14
records.ts
in tools/network/frontend/src/features/network-tool/lib
153 15 65 42 9
ToolResources.java
in tool-reader/src/com/openai/snapo/discovery
210 14 64 30 15
connection.ts
in tools/network/frontend/src/network
215 12 61 28 13
SnapOHttpUrlInterceptor.kt
in tools/network/android/httpurlconnection/src/main/java/com/openai/snapo/network/httpurlconnection
647 36 54 8 4
CapturePaneSession.swift
in app-macos/Snap-O/Capture
486 21 52 11 9
PointerInjectorTests.swift
in app-macos/Snap-OIntegrationTests/LivePreview
468 28 48 10 4
RecordList.tsx
in tools/network/frontend/src/features/network-tool/components
247 3 46 19 31
SharedLivePreviewTests.swift
in app-macos/Snap-OIntegrationTests/LivePreview
469 22 46 10 4
PreviewSetupTests.swift
in app-macos/StandaloneTests/PreviewInput
399 25 44 11 6
MediaLifetimeTests.swift
in app-macos/StandaloneTests/MediaLifetime
547 23 44 8 5
TweakRegistry.kt
in tools/tweaks/android/core/src/main/java/com/openai/snapo/tweaks/internal
689 16 41 6 7
ToolSelectionStateTests.swift
in app-macos/Snap-OUnitTests/Tools
275 7 41 15 18
PreviewVideoTests.swift
in app-macos/Snap-OUnitTests/LivePreview
268 14 40 15 7
CaptureReviewPlayback.swift
in app-macos/Snap-O/Capture/Review
301 27 39 13 5
ScriptedADBConnection.swift
in app-macos/Snap-OIntegrationTests/Device
172 25 38 22 6
keyword-search.ts
in tools/network/frontend/src/network
84 5 37 44 16
LivePreviewPointerInjector.swift
in app-macos/Snap-O/LivePreview/Input
342 10 36 11 7
ToolWebContainer.swift
in app-macos/Snap-O/Tools
362 23 35 10 6
CaptureHistoryRepository.swift
in app-macos/Snap-O/History
361 15 35 10 6
exportActions.ts
in tools/network/frontend/src/features/network-tool/lib
150 8 34 23 16
LivePreviewService.swift
in app-macos/Snap-O/LivePreview
488 25 33 7 4
ToolHTTPTransportTests.swift
in app-macos/Snap-OIntegrationTests/Device
303 20 33 11 6
SharedPreviewVideoTests.swift
in app-macos/Snap-OIntegrationTests/LivePreview
288 16 32 11 4
SharedPreviewTestSupport.swift
in app-macos/Snap-OIntegrationTests/LivePreview
221 22 32 14 3
Main.java
in device-helper/src/com/openai/snapo/video
171 5 31 18 15
Main.java
in device-helper/src/com/openai/snapo/clipboard
129 7 31 24 9
ToolWebContainerTests.swift
in app-macos/Snap-OIntegrationTests/Tools
231 17 31 13 4
Keyboard.java
in device-helper/src/com/openai/snapo/clipboard
141 5 29 21 16
LivePreviewKeyboardTests.swift
in app-macos/Snap-OUnitTests/LivePreview
294 16 29 10 5
ADBDiscoveryTimeoutTests.swift
in app-macos/Snap-OUnitTests/Device
202 16 29 14 9
CaptureReviewState.swift
in app-macos/Snap-O/Capture/Review
269 17 29 11 4
AppToolModel.swift
in app-macos/Snap-O/Tools
255 8 28 11 6
SnapOCommandCoordinator.swift
in app-macos/Snap-O/App
224 17 28 13 4
DeviceManager.swift
in app-macos/Snap-O/DeviceManager
402 11 28 7 7
AndroidHostServiceProtocol.swift
in app-macos/Snap-O/Device
224 14 28 13 9
CaptureStartupTests.swift
in app-macos/StandaloneTests/CapturePane
193 10 28 15 10
PaneDependencies.swift
in app-macos/StandaloneTests/CapturePane
147 23 28 19 4
RuntimeTestServices.swift
in app-macos/StandaloneTests/AppRuntime
210 22 27 13 4
useNetworkToolModel.ts
in tools/network/frontend/src/features/network-tool/hooks
289 3 26 9 22
CaptureReviewOwnershipTests.swift
in app-macos/Snap-OUnitTests/Capture
323 17 26 8 4
ToolHTTPService.swift
in app-macos/Snap-O/Tools
364 6 26 7 14
VideoConnectionDouble.swift
in app-macos/StandaloneTests/VideoStream
119 23 26 22 3
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...