File Complexity Overall
  • There are 29 files with units, with 2,372 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)
    • 0 slightly complex files (McCabe index sum 26-50; 0 lines of code)
    • 29 simple files (McCabe index sum 1-25; 2,372 lines of code)
  • 652 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 0% | 0% | 100%
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
tsx0% | 0% | 0% | 0% | 100%
ts0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
src0% | 0% | 0% | 0% | 100%
.storybook-base0% | 0% | 0% | 0% | 100%
Most Complex Files (Top 29)

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
pointerIntent.ts
in src/components/Popover
98 5 20 20 5
userAgent.ts
in src/lib
31 10 15 48 3
useMathPlugins.tsx
in src/components/Markdown
51 2 11 22 7
63 3 11 17 5
useParseMarkdownPre.ts
in src/components/Markdown
21 1 10 48 10
45 3 9 20 5
AnimateLayout.tsx
in src/components/Transition
249 1 7 3 7
Animate.tsx
in src/components/Transition
106 1 7 7 7
AnimateLayoutGroup.tsx
in src/components/Transition
199 1 7 4 7
directives.ts
in src/components/Markdown
46 3 6 13 3
Calendar.tsx
in src/components/DateRangePicker
359 1 6 2 6
theme.tsx
in src/lib
32 3 6 19 4
shared.ts
in src/components/Transition
105 1 5 5 5
Markdown.tsx
in src/components/Markdown
139 1 4 3 4
main.ts
in .storybook-base
68 1 3 4 3
19 1 3 16 3
helpers.ts
in src/lib
141 1 3 2 3
CodeBlock.tsx
in src/components/CodeBlock
140 2 2 1 1
Input.stories.tsx
in src/components/Input
238 1 2 1 2
useIsMounted.tsx
in src/hooks
18 2 2 11 1
28 1 2 7 2
assert.ts
in src/lib
5 1 2 40 2
internal.ts
in src/components/AppsSDKUIProvider
7 1 1 14 1
Indicator.stories.tsx
in src/components/Indicator
112 1 1 1 1
21 1 1 5 1
usePrevious.tsx
in src/hooks
10 1 1 10 1
7 1 1 14 1
useLatestValue.tsx
in src/hooks
6 1 1 17 1
casing.ts
in src/lib
8 1 1 13 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...