File Complexity Overall
  • There are 20 files with units, with 2,795 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)
    • 2 medium complex files (McCabe index sum 51-125; 799 lines of code)
    • 3 slightly complex files (McCabe index sum 26-50; 870 lines of code)
    • 15 simple files (McCabe index sum 1-25; 1,126 lines of code)
  • 30 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 28% | 31% | 40%
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% | 36% | 26% | 37%
tsx0% | 0% | 0% | 50% | 49%
js0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
apps0% | 0% | 33% | 36% | 29%
cdk0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Files (Top 20)

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
app.ts
in apps/server/src
382 4 64 17 42
webcontainer.ts
in apps/frontend/src/utils
417 19 59 14 9
PreviewFrame.tsx
in apps/frontend/src/components
300 11 37 12 5
dynamo.ts
in apps/server/src
175 12 33 19 14
bedrock.ts
in apps/server/src
395 10 27 7 15
filesystemSync.ts
in apps/frontend/src/utils
94 5 19 20 7
api.ts
in apps/frontend/src/utils
125 6 17 14 4
PuzzleEditor.tsx
in apps/frontend/src/pages
147 1 13 9 13
s3.ts
in apps/server/src
52 4 9 17 4
config.ts
in apps/server/src
40 2 8 20 7
156 3 6 4 4
ExistingPuzzlesBrowser.tsx
in apps/frontend/src/components
65 2 6 9 5
EditableTitle.tsx
in apps/frontend/src/components
44 1 4 9 4
244 1 3 1 3
UserInfoLoader.ts
in apps/frontend/src/components
30 1 3 10 3
HomepageBrowser.tsx
in apps/frontend/src/pages
43 2 2 5 1
auth.ts
in apps/server/src
37 1 2 5 2
22 1 1 5 1
vite.config.ts
in apps/frontend
24 1 1 4 1
common-lib.ts
in apps/common-lib/src/lib
3 1 1 33 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...