File Complexity Overall
  • There are 46 files with units, with 4,584 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)
    • 1 medium complex files (McCabe index sum 51-125; 272 lines of code)
    • 2 slightly complex files (McCabe index sum 26-50; 261 lines of code)
    • 43 simple files (McCabe index sum 1-25; 4,051 lines of code)
  • 458 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 5% | 5% | 88%
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
js0% | 0% | 30% | 17% | 52%
ts0% | 0% | 0% | 3% | 96%
tsx0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
libs0% | 0% | 6% | 5% | 87%
scripts0% | 0% | 0% | 0% | 100%
configs0% | 0% | 0% | 0% | 100%
Most Complex Files (Top 46)

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
stub_tcfv2.js
in libs/@guardian/consent-manager/src
272 35 98 36 10
mq.ts
in libs/@guardian/source/src/foundations/mq
105 43 43 41 1
stub_gpp_usnat.js
in libs/@guardian/consent-manager/src
156 4 32 21 19
check-npm-scripts.ts
in scripts/deno
131 5 22 17 7
tokenManager.ts
in libs/@guardian/identity-auth/src
144 6 18 13 6
sourcepoint.ts
in libs/@guardian/consent-manager/src
312 11 18 6 2
token.ts
in libs/@guardian/identity-auth/src
811 8 17 2 5
CrosswordInteraction.stories.tsx
in libs/@guardian/react-crossword/src/components
125 17 17 14 1
size.js
in libs/@guardian/source/src/design-tokens/cobalt-plugins
65 2 9 14 8
getErrorMessage.ts
in libs/@guardian/libs/src/getErrorMessage
27 3 9 33 4
onConsentChange.ts
in libs/@guardian/consent-manager/src
116 3 9 8 4
emitter.ts
in libs/@guardian/identity-auth/src
47 4 7 15 4
NumericInput.tsx
in libs/@guardian/source-development-kitchen/src/react-components/numeric-input
127 1 7 6 7
ab.ts
in libs/@guardian/ab-core/src
55 7 7 13 1
palette.js
in libs/@guardian/source/src/design-tokens/cobalt-plugins
43 2 6 14 5
space.js
in libs/@guardian/source/src/design-tokens/cobalt-plugins
54 2 6 11 5
Select.tsx
in libs/@guardian/source/src/react-components/select
107 1 6 6 6
typography.js
in libs/@guardian/source/src/design-tokens/cobalt-plugins
75 2 5 7 4
breakpoints.js
in libs/@guardian/source/src/design-tokens/cobalt-plugins
50 2 5 10 4
storage.ts
in libs/@guardian/libs/src/storage
64 3 5 8 3
cmp.ts
in libs/@guardian/consent-manager/src
62 1 5 8 5
server.ts
in libs/@guardian/consent-manager/src
64 5 5 8 1
identityAuth.ts
in libs/@guardian/identity-auth/src
139 3 4 3 2
authState.ts
in libs/@guardian/identity-auth/src
57 4 4 7 1
get-svgs-from-figma.ts
in libs/@guardian/source/scripts/create-icons
66 2 4 6 3
index.ts
in libs/@guardian/source/scripts/create-icons
65 3 4 6 2
focus-style-manager.ts
in libs/@guardian/source/src/foundations/accessibility
55 4 4 7 1
Columns.tsx
in libs/@guardian/source/src/react-components/columns
61 4 4 7 1
mergeUserConsent.ts
in libs/@guardian/consent-manager/src
140 4 4 3 1
footerLinksStyles.ts
in libs/@guardian/source-development-kitchen/src/react-components/footer-with-contents
110 2 4 4 2
Checkbox.tsx
in libs/@guardian/source/src/react-components/checkbox
133 1 3 2 3
playwright.config.js
in libs/@guardian/libs
19 1 3 16 3
playwright.config.js
in libs/@guardian/consent-manager
19 1 3 16 3
ChoiceCard.tsx
in libs/@guardian/source/src/react-components/choice-card
106 1 2 2 2
AccordionRow.tsx
in libs/@guardian/source/src/react-components/accordion
129 1 2 2 2
getConsentState.ts
in libs/@guardian/consent-manager/src/tcfv2
45 1 2 4 2
rollup.config.js
in libs/@guardian/source
7 1 1 14 1
create-icon-component.ts
in libs/@guardian/source/scripts/create-icons
162 1 1 1 1
generateSvg.logger.subscriptions.ts
in libs/@guardian/libs/scripts
78 1 1 1 1
typescript.js
in libs/@guardian/eslint-config/configs
68 1 1 1 1
rollup.config.js
in libs/@guardian/react-crossword
6 1 1 17 1
rollup.config.js
in libs/@guardian/consent-manager
7 1 1 14 1
getConsentState.ts
in libs/@guardian/consent-manager/src/aus
13 1 1 8 1
getConsentDetailsForOphan.ts
in libs/@guardian/consent-manager/src
32 1 1 3 1
rollup.config.js
in libs/@guardian/source-development-kitchen
7 1 1 14 1
rollup.config.js
in configs/rollup
48 1 1 2 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...