File Complexity Overall
  • There are 715 files with units, with 67,952 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)
    • 14 slightly complex files (McCabe index sum 26-50; 3,409 lines of code)
    • 701 simple files (McCabe index sum 1-25; 64,543 lines of code)
  • 607 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 0% | 5% | 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
scala0% | 0% | 0% | 7% | 92%
ts0% | 0% | 0% | 2% | 97%
sc0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
handlers0% | 0% | 0% | 3% | 96%
lib0% | 0% | 0% | 18% | 81%
modules0% | 0% | 0% | 7% | 92%
cdk0% | 0% | 0% | 0% | 100%
buildcheck0% | 0% | 0% | 0% | 100%
ROOT0% | 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
RestRequestMaker.scala
in lib/restHttp/src/main/scala/com/gu/util/resthttp
199 19 50 25 6
Handler.scala
in handlers/holiday-stop-api/src/main/scala/com/gu/holiday_stops
552 14 49 9 22
acquisitions.ts
in handlers/mparticle-acquisitions-publisher/src
312 15 47 15 8
RatePlanChargeBillingSchedule.scala
in lib/zuora-core/src/main/scala/com/gu/zuora/subscription
289 11 44 15 8
AutoCancel.scala
in handlers/zuora-callout-apis/src/main/scala/com/gu/autoCancel
188 8 34 18 7
downloadRealSubscriptions.ts
in modules/guardian-subscription/runManual/realSubscriptions
190 9 33 17 12
paymentDescription.ts
in modules/email/src/dataFields/dayZero
191 13 31 16 6
ZuoraRerService.scala
in handlers/zuora-rer/src/main/scala/com/gu/zuora/rer
223 13 31 14 4
SQS.scala
in handlers/product-move-api/src/main/scala/com/gu/productmove
278 12 31 11 10
Handler.scala
in handlers/sf-emails-to-s3-exporter/src/main/scala/com/gu/sf_emails_to_s3_exporter
177 9 31 18 7
Types.scala
in lib/handler/src/main/scala/com/gu/util/reader
143 13 30 21 3
SubscriptionData.scala
in lib/zuora-core/src/main/scala/com/gu/zuora/subscription
169 10 29 17 9
createSubscription.ts
in modules/zuora/src/createSubscription
287 8 29 10 18
ZuoraOrders.scala
in lib/zuora-core/src/main/scala/com/gu/zuora
211 5 26 12 14
WireModel.scala
in handlers/new-product-api/src/main/scala/com/gu/newproduct/api/productcatalog
203 7 25 12 8
Salesforce.scala
in handlers/single-contribution-salesforce-writes/src/main/scala/com/gu/singleContributionSalesforceWrites/services
178 9 25 14 5
RecurringContributionToSupporterPlus.scala
in handlers/product-move-api/src/main/scala/com/gu/productmove/endpoint/move/switchtype
374 8 23 6 5
S3Connector.scala
in handlers/sf-emails-to-s3-exporter/src/main/scala/com/gu/sf_emails_to_s3_exporter
158 10 23 15 6
Handler.scala
in handlers/sf-gocardless-sync/src/main/scala/com/gu/sf_gocardless_sync
188 7 22 12 6
Handler.scala
in handlers/dev-env-cleaner/src/main/scala/com/gu/cleaner
231 9 22 10 8
brazeClient.ts
in handlers/mparticle-api/src/services
123 4 22 18 12
ToRecurringContribution.scala
in handlers/product-move-api/src/main/scala/com/gu/productmove/endpoint/move/switchtype
231 6 21 9 8
Lambda.scala
in handlers/stripe-webhook-endpoints/src/main/scala/com/gu/paymentIntentIssues
140 7 21 15 6
IAPMessageProcessor.scala
in handlers/soft-opt-in-consent-setter/src/main/scala/com/gu/soft_opt_in_consent_setter
190 6 21 11 8
Processor.scala
in lib/credit-processor/src/main/scala/com/gu/creditprocessor
281 7 20 7 9
GetSFContactSyncCheckFields.scala
in handlers/identity-backfill/src/main/scala/com/gu/identityBackfill/salesforce
101 4 20 20 14
ProductMoveEndpointSteps.scala
in handlers/product-move-api/src/main/scala/com/gu/productmove/endpoint/move
83 4 20 24 7
SalesforceHolidayStopRequest.scala
in lib/holiday-stops/src/main/scala/com/gu/salesforce/holiday_stops
356 10 19 5 8
restClient.ts
in modules/zuora/src
222 10 19 9 7
subscriptionFilter.ts
in modules/guardian-subscription/src
154 8 19 12 5
UpdateSupporterPlusAmountSteps.scala
in handlers/product-move-api/src/main/scala/com/gu/productmove/endpoint/updateamount
164 3 19 12 12
Main.scala
in handlers/sf-api-user-credentials-setter/src/main/scala/com/gu/sfapiusercredentialsetter
224 14 19 8 3
SalesforceToBrazeCampaignMapping.scala
in handlers/batch-email-sender/src/main/scala/com/gu/batchemailsender/api/batchemail
28 1 19 68 19
getProductRatePlan.ts
in modules/zuora/src/createSubscription
98 1 18 18 18
SendConfirmationEmail.scala
in handlers/new-product-api/src/main/scala/com/gu/newproduct/api/addsubscription/email
57 3 18 32 13
DeliveryCreditProcessor.scala
in handlers/delivery-problem-credit-processor/src/main/scala/com/gu/deliveryproblemcreditprocessor
222 7 18 8 4
secondaryUserRepository.ts
in modules/multiple-account/src
238 14 17 7 3
PreReqCheck.scala
in handlers/identity-backfill/src/main/scala/com/gu/identityBackfill
110 5 17 15 5
AvailableProductMovesEndpoint.scala
in handlers/product-move-api/src/main/scala/com/gu/productmove/endpoint/available
190 5 17 9 5
DomainSteps.scala
in handlers/sf-contact-merge/src/main/scala/com/gu/sf_contact_merge
148 6 17 11 4
CardUpdatedSteps.scala
in handlers/stripe-webhook-endpoints/src/main/scala/com/gu/stripeCardUpdated
143 6 17 12 6
SalesforceConnector.scala
in handlers/soft-opt-in-consent-setter/src/main/scala/com/gu/soft_opt_in_consent_setter
140 12 17 12 3
S3Helper.scala
in handlers/zuora-sar/src/main/scala/com/gu/zuora/sar
168 7 17 10 4
SalesforceToBrazeTransformations.scala
in handlers/batch-email-sender/src/main/scala/com/gu/batchemailsender/api/batchemail
39 5 17 44 4
RatePlanChargeData.scala
in lib/zuora-core/src/main/scala/com/gu/zuora/subscription
87 4 16 18 8
subscription.ts
in modules/zuora/src
109 8 16 15 2
SubscriptionCancelEndpointSteps.scala
in handlers/product-move-api/src/main/scala/com/gu/productmove/endpoint/cancel
163 4 16 10 9
multipleAccountEmails.ts
in handlers/multiple-account-api/src
217 13 16 7 3
DigitalVoucherService.scala
in handlers/digital-voucher-api/src/main/scala/com/gu/digital_voucher_api
166 8 16 10 5
Types.scala
in lib/restHttp/src/main/scala/com/gu/util/resthttp
75 6 15 20 6
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...