File Complexity Overall
  • There are 65 files with units, with 5,357 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)
    • 1 slightly complex files (McCabe index sum 26-50; 152 lines of code)
    • 64 simple files (McCabe index sum 1-25; 5,205 lines of code)
  • 239 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 0% | 2% | 97%
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% | 3% | 96%
ts0% | 0% | 0% | 0% | 100%
js0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
imageCopier0% | 0% | 0% | 31% | 68%
app0% | 0% | 0% | 0% | 100%
cdk0% | 0% | 0% | 0% | 100%
public0% | 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
Attempt.scala
in imageCopier/src/main/scala/com/gu/imageCopier/attempt
152 17 34 22 5
BaseImage.scala
in app/models
133 8 23 17 5
Recipes.scala
in app/data
143 7 19 13 4
Bakes.scala
in app/data
136 11 18 13 4
RecipeUsage.scala
in app/prism
152 10 17 11 4
RecipeController.scala
in app/controllers
360 8 17 5 6
Behaviours.scala
in app/event
70 5 17 24 5
BaseImageController.scala
in app/controllers
253 7 14 6 4
Dynamo.scala
in app/data
156 8 13 8 4
64 4 12 19 4
AmiActions.scala
in imageCopier/src/main/scala/com/gu/imageCopier
107 5 12 11 3
BakeFailedNotifier.scala
in app/notification
97 3 11 11 5
SNS.scala
in app/notification
91 6 11 12 3
RoleParser.scala
in app/ansible
55 5 10 18 3
BakeController.scala
in app/controllers
132 5 10 8 4
PrismData.scala
in app/services
119 3 10 8 6
amigo.js
in public/javascripts
43 8 10 23 2
88 3 9 10 5
84 4 9 11 3
roles.js
in public/javascripts
37 8 9 24 2
LambdaEntrypoint.scala
in imageCopier/src/main/scala/com/gu/imageCopier
86 2 9 10 6
61 4 8 13 4
PackerRunner.scala
in app/packer
161 3 8 5 4
57 1 7 12 7
53 2 7 13 4
PackerEC2Client.scala
in app/housekeeping/utils
86 3 6 7 4
49 2 6 12 5
89 1 6 7 6
52 3 5 10 3
BakeScheduler.scala
in app/schedule
59 4 5 8 2
Prism.scala
in app/prism
116 2 5 4 4
24 2 5 21 3
Roles.scala
in app/data
66 5 5 8 1
BakeLogs.scala
in app/data
49 4 5 10 2
BakeDeletion.scala
in app/housekeeping
42 1 4 10 4
56 2 4 7 3
ControllerHelpers.scala
in app/controllers
24 1 4 17 4
36 1 4 11 4
BaseImages.scala
in app/data
65 4 4 6 1
BakeEvent.scala
in app/event
56 1 4 7 4
64 1 4 6 4
show-bake.js
in public/javascripts
24 4 4 17 1
DeleteEvent.scala
in imageCopier/src/main/scala/com/gu/imageCopier
34 2 4 12 2
Failure.scala
in imageCopier/src/main/scala/com/gu/imageCopier/attempt
36 2 4 11 3
amigo.ts
in cdk/lib
330 2 3 1 2
98 3 3 3 1
Bake.scala
in app/models
57 1 3 5 3
Login.scala
in app/controllers
70 2 3 4 2
BakesRepo.scala
in app/housekeeping/utils
21 1 2 10 2
HousekeepingScheduler.scala
in app/housekeeping
30 2 2 7 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...