File Complexity Overall
  • There are 328 files with units, with 73,177 lines of code.
    • 0 very complex files (McCabe index sum 251+; 0 lines of code)
    • 1 complex files (McCabe index sum 126-250; 25 lines of code)
    • 3 medium complex files (McCabe index sum 51-125; 1,004 lines of code)
    • 9 slightly complex files (McCabe index sum 26-50; 3,034 lines of code)
    • 315 simple files (McCabe index sum 1-25; 69,114 lines of code)
  • 1,098 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | <1% | 1% | 4% | 94%
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% | 56% | 0% | 0% | 43%
ts0% | 0% | 4% | 3% | 91%
tsx0% | 0% | 0% | 4% | 95%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
dotcom-rendering0% | <1% | 1% | 3% | 94%
ab-testing0% | 0% | 0% | 21% | 78%
scripts0% | 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
curl-with-js-and-domReady.js
in dotcom-rendering/src/static/js
25 1 156 624 156
discussion.ts
in dotcom-rendering/src/lib
381 94 110 29 2
feCricketMatchData.ts
in dotcom-rendering/src/frontend
93 60 60 65 1
enhanceCards.ts
in dotcom-rendering/src/model
530 8 55 10 10
feFootballMatchListPage.ts
in dotcom-rendering/src/frontend
113 41 41 36 1
feFootballMatchInfoPage.ts
in dotcom-rendering/src/frontend
94 37 37 39 1
enhance-images.ts
in dotcom-rendering/src/model
397 14 36 9 10
StackedProgress.stories.tsx
in dotcom-rendering/src/components/ElectionTrackers
246 27 33 13 2
ValuesWithChange.stories.tsx
in dotcom-rendering/src/components/ElectionTrackers
242 31 31 13 1
BannerWrapper.tsx
in dotcom-rendering/src/components/marketing/banners/common
402 9 31 8 12
client.ts
in ab-testing/config/lib/fastly
188 19 30 16 3
CricketMatchHeader.tsx
in dotcom-rendering/src/components/CricketMatchHeader
657 9 27 4 11
DecideLayout.stories.tsx
in dotcom-rendering/src/layouts
695 27 27 4 1
useDesignableBannerModel.ts
in dotcom-rendering/src/components/marketing/banners/designableBanner
370 23 25 7 2
ReaderRevenueBanner.tsx
in dotcom-rendering/src/components/StickyBottomBanner
352 5 22 6 15
BrazeBannersSystem.tsx
in dotcom-rendering/src/lib/braze
1200 12 22 2 8
NewsletterSignupForm.island.stories.tsx
in dotcom-rendering/src/components
227 21 21 9 1
FootballMatchHeader.stories.tsx
in dotcom-rendering/src/components/FootballMatchHeader
274 21 21 8 1
Metrics.island.tsx
in dotcom-rendering/src/components
195 5 20 10 9
GalleryLayout.tsx
in dotcom-rendering/src/layouts
643 5 20 3 9
test-group-mvt-manager.ts
in ab-testing/config/scripts/build
110 4 20 18 10
FootballMatchHeader.tsx
in dotcom-rendering/src/components/FootballMatchHeader
561 8 19 3 5
productBlockElement.ts
in dotcom-rendering/fixtures/manual
791 18 18 2 1
TextBlockComponent.tsx
in dotcom-rendering/src/components
356 4 15 4 6
iframe-titles.ts
in scripts/deno
172 8 15 9 6
ManyNewsletterSignUp.island.tsx
in dotcom-rendering/src/components
405 8 14 3 3
Liveness.island.tsx
in dotcom-rendering/src/components
218 3 13 6 6
enhanceLists.ts
in dotcom-rendering/src/model
157 4 13 8 6
main.web.ts
in dotcom-rendering/src/client
129 13 13 10 1
DiscussionWeb.island.tsx
in dotcom-rendering/src/components
91 12 12 13 1
NotificationsToggle.stories.tsx
in dotcom-rendering/src/components
76 12 12 16 1
ArticleMeta.web.stories.tsx
in dotcom-rendering/src/components
369 12 12 3 1
Notifications.stories.tsx
in dotcom-rendering/src/components/FootballMatchHeader
127 12 12 9 1
USCongress.stories.tsx
in dotcom-rendering/src/components/ElectionTrackers
189 8 12 6 2
CricketMatchHeaderTabsDemo.stories.tsx
in dotcom-rendering/src/components
140 12 12 9 1
ThreeTierChoiceCards.tsx
in dotcom-rendering/src/components/marketing/shared
353 4 12 3 8
storybook.ts
in dotcom-rendering/src/components/marketing/banners/utils
140 12 12 9 1
enhanceTableOfContents.ts
in dotcom-rendering/src/model
110 4 12 11 3
Caption.tsx
in dotcom-rendering/src/components
396 1 11 3 11
scheduler.ts
in dotcom-rendering/src/lib
90 6 11 12 5
footballMatchV2.ts
in dotcom-rendering/src
263 5 10 4 5
Branding.island.tsx
in dotcom-rendering/src/components
248 1 10 4 10
LiveBlogEpic.island.tsx
in dotcom-rendering/src/components
275 2 10 4 9
DesignableBannerReminderSignedOut.tsx
in dotcom-rendering/src/components/marketing/banners/designableBanner/components
254 5 10 4 3
AdmiralScript.island.tsx
in dotcom-rendering/src/components
277 9 10 4 2
sIndicator.ts
in dotcom-rendering/src/client
200 1 10 5 10
DirectoryPageNav.island.tsx
in dotcom-rendering/src/components
533 9 9 2 1
LightboxLink.tsx
in dotcom-rendering/src/components
154 1 9 6 9
CricketMatchHeader.stories.tsx
in dotcom-rendering/src/components/CricketMatchHeader
396 9 9 2 1
ContributionsEpic.tsx
in dotcom-rendering/src/components/marketing/epics
406 2 9 2 5
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...