File Complexity Overall
  • There are 133 files with units, with 26,723 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; 696 lines of code)
    • 5 slightly complex files (McCabe index sum 26-50; 1,268 lines of code)
    • 126 simple files (McCabe index sum 1-25; 24,759 lines of code)
  • 460 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 2% | 4% | 92%
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% | 7% | 11% | 81%
js0% | 0% | 0% | 79% | 20%
tsx0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
client0% | 0% | 3% | 2% | 94%
shared0% | 0% | 0% | 25% | 74%
.storybook0% | 0% | 0% | 79% | 20%
server0% | 0% | 0% | 0% | 100%
cdk0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
cypress0% | 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
suggestedAmounts.ts
in client/utilities/pricingConfig
356 12 98 28 15
testProducts.ts
in client/fixtures/productBuilder
340 53 53 16 1
403 7 47 12 26
productBuilder.ts
in client/fixtures/productBuilder
215 25 46 21 6
mockServiceWorker.js
in .storybook/static
227 11 39 17 11
upgradeProductPaymentCopy.ts
in client/utilities
208 15 29 14 4
user.ts
in client/components/mma/identity/idapi
215 14 28 13 2
identityMiddleware.ts
in server/middleware
281 5 25 9 8
stripeCardInputForm.tsx
in client/components/mma/paymentUpdate/card
303 3 25 8 19
Billing.tsx
in client/components/mma/billing
440 7 23 5 13
oauth.ts
in server
296 19 22 7 4
DefaultApiResponseHandler.tsx
in client/components/mma/shared/asyncComponents
86 7 21 24 4
utils.ts
in client/utilities
85 7 18 21 4
AsyncLoader.tsx
in client/components/mma/shared
131 3 17 13 7
baseProducts.ts
in client/fixtures/productBuilder
1244 17 17 1 1
ContributionUpdateAmountForm.tsx
in client/components/mma/accountoverview/updateAmount
403 2 13 3 10
54 4 12 22 8
identity.ts
in client/components/mma/identity
129 8 12 9 3
ProductCardSections.tsx
in client/components/mma/accountoverview
752 3 11 1 9
useFetch.ts
in client/utilities/hooks
68 1 10 15 10
UpgradeSupportAmountForm.tsx
in client/components/mma/upgrade
240 3 10 4 7
SupporterPlusUpdateAmountForm.tsx
in client/components/mma/accountoverview/updateAmount
386 1 10 3 10
925 6 9 1 4
useExtraAccounts.ts
in client/utilities/hooks
383 5 9 2 2
apiProxy.ts
in server
187 4 8 4 3
HolidayStopApi.ts
in client/components/mma/holiday
195 4 7 4 2
UpgradeProduct.stories.tsx
in client/components/mma/upgradeProduct
361 7 7 2 1
DirectDebitInputForm.tsx
in client/components/mma/paymentUpdate/dd
257 2 7 3 5
91 1 6 7 6
dates.ts
in shared
217 2 6 3 5
lazyWithRetry.ts
in client/utilities
42 1 6 14 6
SettingsFormSection.tsx
in client/components/mma/identity/settings
333 1 6 2 6
FieldWrapper.tsx
in client/components/mma/paymentUpdate
137 2 6 4 5
cancellationContributionReminder.tsx
in client/components/mma/cancel
153 5 5 3 1
EmailAndMarketing.tsx
in client/components/mma/identity/emailAndMarketing
228 3 5 2 2
194 1 4 2 4
currencyIso.ts
in client/utilities
30 3 4 13 2
stripe.ts
in client/utilities
58 1 4 7 4
useAsyncLoader.ts
in client/utilities/hooks
45 2 4 9 2
LiveChatPrivacyNotice.tsx
in client/components/helpCentre/liveChat
74 1 4 5 4
ErrorBoundary.tsx
in client/components/shared
32 2 4 13 3
DigiSubSaves.stories.tsx
in client/components/mma/cancel/cancellationSaves/digipack
116 4 4 3 1
CancellationReasonSelection.tsx
in client/components/mma/cancel
374 1 4 1 4
CancellationReasonReview.tsx
in client/components/mma/cancel
852 2 4 0 3
CancellationContainer.tsx
in client/components/mma/cancel
175 1 4 2 4
UpgradeSupportContainer.tsx
in client/components/mma/upgrade
129 1 4 3 4
ProfileFormSection.tsx
in client/components/mma/identity/publicProfile
91 1 4 4 4
PaymentDetailsTableV2.tsx
in client/components/mma/shared
197 1 4 2 4
PaymentDetailUpdateConfirmation.tsx
in client/components/mma/paymentUpdate
429 1 4 1 4
305 3 3 1 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...