File Complexity Overall
  • There are 60 files with units, with 6,476 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)
    • 5 slightly complex files (McCabe index sum 26-50; 1,034 lines of code)
    • 55 simple files (McCabe index sum 1-25; 5,442 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% | 0% | 15% | 84%
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% | 13% | 86%
js0% | 0% | 0% | 28% | 71%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
app0% | 0% | 0% | 9% | 90%
frontend0% | 0% | 0% | 28% | 71%
configTools0% | 0% | 0% | 28% | 71%
setup0% | 0% | 0% | 34% | 65%
example0% | 0% | 0% | 0% | 100%
project0% | 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
passkeys.js
in frontend/utils
305 11 49 16 14
DBSetupApp.scala
in setup/src/main/scala/aws
120 2 30 25 24
UserAccess.scala
in app/logic
255 10 27 11 6
Config.scala
in app/conf
158 12 26 16 5
Loader.scala
in configTools/src/main/scala/com/gu/janus/config
196 8 26 13 6
160 8 22 14 7
Date.scala
in app/logic
99 12 22 22 5
janus.js
in frontend
374 8 22 6 8
PasskeyController.scala
in app/controllers
275 8 20 7 4
51 3 18 35 11
MetricsService.scala
in app/services
247 6 16 6 3
Janus.scala
in app/controllers
436 8 15 3 6
176 7 14 8 6
Passkey.scala
in app/models
160 7 13 8 4
Passkey.scala
in app/logic
198 6 12 6 3
AuditTrail.scala
in app/logic
169 5 12 7 5
PasskeyDB.scala
in app/aws
253 8 12 5 4
models.scala
in configTools/src/main/scala/com/gu/janus/model
141 6 12 9 3
69 4 11 16 6
ViewHelpers.scala
in app/logic
63 4 10 16 4
Accounts.scala
in app/logic
78 6 9 12 3
modalUtils.js
in frontend/utils
262 2 9 3 5
Validation.scala
in configTools/src/main/scala/com/gu/janus
68 5 9 13 3
Statements.scala
in configTools/src/main/scala/com/gu/janus/policy
83 6 8 10 3
Favourites.scala
in app/logic
54 4 7 13 3
173 4 7 4 2
57 2 6 11 4
72 1 6 8 6
94 5 6 6 2
ResultHandler.scala
in app/controllers
25 1 6 24 6
RevokePermissions.scala
in app/controllers
118 3 6 5 3
Audit.scala
in app/controllers
81 4 6 7 2
snow.js
in frontend
67 3 6 9 4
toastMessages.js
in frontend/utils
28 2 6 21 5
28 2 5 18 4
models.scala
in app/models
189 1 5 3 5
93 5 5 5 1
Validation.scala
in app/controllers
16 1 5 31 5
Main.scala
in example/src/main/scala/com/example
46 1 5 11 5
VerifyJanusData.scala
in configTools/src/main/scala/com/gu/janus
37 1 5 14 5
JanusConfig.scala
in configTools/src/main/scala/com/gu/janus
39 5 5 13 1
45 2 4 9 3
AccountsController.scala
in app/controllers
93 2 4 4 3
Revocation.scala
in app/logic
11 1 2 18 2
PlayHelpers.scala
in app/logic
7 1 2 29 2
csrf.js
in frontend/utils
13 1 2 15 2
Support.scala
in example/src/main/scala/com/example
37 1 2 5 2
AuditTrailDBSetup.scala
in setup/src/main/scala/aws
86 2 2 2 1
26 1 2 8 2
Writer.scala
in configTools/src/main/scala/com/gu/janus/config
14 2 2 14 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...