File Complexity Overall
  • There are 105 files with units, with 7,577 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; 210 lines of code)
    • 6 slightly complex files (McCabe index sum 26-50; 1,743 lines of code)
    • 98 simple files (McCabe index sum 1-25; 5,624 lines of code)
  • 50 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 2% | 23% | 74%
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% | 2% | 23% | 74%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
membership-attribute-service0% | 0% | 4% | 27% | 68%
membership-common0% | 0% | 0% | 13% | 86%
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
AccountDetailsFromZuora.scala
in membership-attribute-service/app/services
210 10 52 25 25
SubscriptionService.scala
in membership-common/src/main/scala/com/gu/memsub/subsv2/services
160 10 43 27 14
ZuoraRestService.scala
in membership-attribute-service/app/services/zuora/rest
560 15 40 7 9
AccountDetails.scala
in membership-attribute-service/app/models
241 5 34 14 17
AccountController.scala
in membership-attribute-service/app/controllers
340 9 32 9 7
ProductFamily.scala
in membership-common/src/main/scala/com/gu/memsub
185 4 31 17 16
AttributeController.scala
in membership-attribute-service/app/controllers
257 7 26 10 10
Subscription.scala
in membership-common/src/main/scala/com/gu/memsub/subsv2
109 4 25 23 10
PaymentFailureAlerter.scala
in membership-attribute-service/app/services
126 6 24 19 10
ExistingPaymentOptionsController.scala
in membership-attribute-service/app/controllers
126 3 23 18 17
SimpleClientZuoraRestService.scala
in membership-attribute-service/app/services/zuora/rest
141 12 21 15 4
PaymentService.scala
in membership-attribute-service/app/services/zuora/payment
134 7 20 15 5
PaymentUpdateController.scala
in membership-attribute-service/app/controllers
203 3 18 9 8
IdentityAuthService.scala
in membership-attribute-service/app/services
71 3 18 25 9
BillingSchedule.scala
in membership-common/src/main/scala/com/gu/memsub
89 6 18 20 9
Scalaforce.scala
in membership-common/src/main/scala/com/gu/salesforce
142 7 15 11 5
CommonReads.scala
in membership-common/src/main/scala/com/gu/memsub/subsv2/reads
38 3 14 37 8
ZuoraService.scala
in membership-common/src/main/scala/com/gu/zuora
118 7 14 12 3
Stripe.scala
in membership-common/src/main/scala/com/gu/stripe
162 3 14 9 6
ExistingPaymentOption.scala
in membership-attribute-service/app/models
60 3 13 22 5
MobileSubscriptionPlatform.scala
in membership-attribute-service/app/models
39 2 12 31 11
ContactController.scala
in membership-attribute-service/app/controllers
87 3 12 14 6
WebServiceHelper.scala
in membership-common/src/main/scala/com/gu/memsub/util
77 4 12 16 4
SafeLogger.scala
in membership-common/src/main/scala/com/gu/monitoring
62 12 12 19 1
SubJsonReads.scala
in membership-common/src/main/scala/com/gu/memsub/subsv2/reads
93 5 11 12 3
AuthAndBackendViaIdapiAction.scala
in membership-attribute-service/app/actions
65 3 10 15 4
DynamoSupporterProductDataService.scala
in membership-attribute-service/app/services
71 4 10 14 6
HttpBasicStripeService.scala
in membership-attribute-service/app/services/stripe
48 4 10 21 4
CatJsonReads.scala
in membership-common/src/main/scala/com/gu/memsub/subsv2/reads
65 4 10 15 3
ZuoraPaymentWrites.scala
in membership-common/src/main/scala/com/gu/zuora/rest
66 2 10 15 6
Readers.scala
in membership-common/src/main/scala/com/gu/zuora/rest
40 2 10 25 8
GuardianPatronService.scala
in membership-attribute-service/app/services
131 5 9 7 3
DeliveryAddress.scala
in membership-attribute-service/app/models
42 3 8 19 5
SupporterRatePlanToAttributesMapper.scala
in membership-attribute-service/app/services
378 5 8 2 2
ContributionsStoreDatabaseService.scala
in membership-attribute-service/app/services
72 5 8 11 4
SimpleClient.scala
in membership-common/src/main/scala/com/gu/zuora/rest
57 3 7 12 5
Reader.scala
in membership-common/src/main/scala/com/gu/salesforce/job
51 3 7 14 5
AddGuIdentityHeaders.scala
in membership-attribute-service/app/filters
33 3 6 18 4
SentryLogging.scala
in membership-attribute-service/app/monitoring
32 1 6 19 6
Sequence.scala
in membership-attribute-service/app/services/subscription
16 1 6 38 6
SimpleContactRepository.scala
in membership-attribute-service/app/services/salesforce
52 4 6 12 3
SimpleEitherT.scala
in membership-attribute-service/app/utils
29 3 5 17 3
AuthAndBackendViaAuthLibAction.scala
in membership-attribute-service/app/actions
29 1 5 17 5
MobileSubscriptionService.scala
in membership-attribute-service/app/services
47 2 5 11 4
SqsAsync.scala
in membership-attribute-service/app/services/mail
52 2 5 10 4
SetPaymentCard.scala
in membership-attribute-service/app/services/zuora/payment
49 2 5 10 3
CancelSubscription.scala
in membership-attribute-service/app/services/subscription
44 2 5 11 3
ScheduledTask.scala
in membership-common/src/main/scala/com/gu/memsub/util
41 3 5 12 3
Plan.scala
in membership-common/src/main/scala/com/gu/memsub/subsv2
205 3 5 2 3
CatalogService.scala
in membership-common/src/main/scala/com/gu/memsub/subsv2/services
57 3 5 9 3
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...