File Complexity Overall
  • There are 172 files with units, with 15,209 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)
    • 8 medium complex files (McCabe index sum 51-125; 2,855 lines of code)
    • 15 slightly complex files (McCabe index sum 26-50; 2,978 lines of code)
    • 149 simple files (McCabe index sum 1-25; 9,376 lines of code)
  • 186 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 18% | 19% | 61%
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% | 21% | 22% | 55%
tsx0% | 0% | 0% | 0% | 100%
rb0% | 0% | 0% | 0% | 100%
py0% | 0% | 0% | 0% | 100%
ts0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
app0% | 0% | 23% | 28% | 48%
lambda0% | 0% | 44% | 18% | 37%
common0% | 0% | 14% | 5% | 80%
frontend0% | 0% | 0% | 0% | 100%
ProxyStatsGathering0% | 0% | 0% | 0% | 100%
testscripts0% | 0% | 0% | 0% | 100%
utils0% | 0% | 0% | 0% | 100%
cloudformation0% | 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
LightboxController.scala
in app/controllers
449 18 99 22 14
ProxiesController.scala
in app/controllers
415 13 92 22 22
InputLambdaMain.scala
in lambda/input/src/main/scala
346 18 81 23 15
Auth.scala
in app/controllers
439 16 73 17 10
ImprovedLargeFileCopier.scala
in app/services/FileMove
443 16 68 15 11
ProxyGenerators.scala
in common/src/main/scala/com/theguardian/multimedia/archivehunter/common/ProxyTranscodeFramework
260 12 63 24 13
247 15 62 25 14
256 11 53 21 19
UserController.scala
in app/controllers
172 7 47 27 11
Security.scala
in app/auth
178 15 43 24 8
SearchController.scala
in app/controllers
270 11 43 16 6
S3XMLProcessor.scala
in app/helpers
165 7 40 24 16
ImportController.scala
in app/controllers
203 9 39 19 12
ScanTargetController.scala
in app/controllers
214 14 37 17 7
IngestProxyQueue.scala
in app/services
180 1 35 19 35
215 5 34 16 10
AutoDowningLambdaMain.scala
in lambda/autodowning/src/main/scala
141 9 33 23 9
233 6 29 12 13
FileMoveQueue.scala
in app/services
129 2 27 21 26
ProxyLocation.scala
in common/src/main/scala/com/theguardian/multimedia/archivehunter/common
105 6 27 26 15
S3Signer.scala
in app/helpers
179 9 26 15 10
ProxyFramework.scala
in app/helpers
160 7 26 16 5
434 6 26 6 8
ProblemItemIndexer.scala
in common/src/main/scala/com/theguardian/multimedia/archivehunter/common
96 9 25 26 6
rundev.py
in ProxyStatsGathering/scripts
133 8 25 19 7
ScanTargetDAO.scala
in common/src/main/scala/com/theguardian/multimedia/archivehunter/common/cmn_models
117 10 24 21 5
JobController.scala
in app/controllers
118 6 23 19 6
ProxyLocator.scala
in app/helpers
102 5 23 23 8
146 7 23 16 7
162 8 22 14 6
Indexer.scala
in common/src/main/scala/com/theguardian/multimedia/archivehunter/common
92 7 21 23 6
MainContent.scala
in ProxyStatsGathering/src/main/scala
126 7 21 17 5
LightboxHelper.scala
in app/helpers
152 11 20 13 4
ProxiesRelinker.scala
in app/services
170 3 20 12 17
ArchiveEntry.scala
in common/src/main/scala/com/theguardian/multimedia/archivehunter/common
84 5 20 24 14
MediaMetadata.scala
in common/src/main/scala/com/theguardian/multimedia/archivehunter/common/cmn_models
88 4 20 23 13
make-dev-stack.rb
in cloudformation
122 10 20 16 6
DeleteOriginalFiles.scala
in app/services/FileMove
117 5 18 15 7
90 6 16 18 6
JobModelDAO.scala
in common/src/main/scala/com/theguardian/multimedia/archivehunter/common/cmn_models
88 4 16 18 7
ApacheComms.scala
in lambda/autodowning/src/main/scala
92 4 16 17 5
93 5 15 16 5
101 2 15 15 8
157 2 15 10 9
BucketScanner.scala
in app/services
207 6 15 7 4
S3RestoreHeader.scala
in common/src/main/scala/com/theguardian/multimedia/archivehunter/common/cmn_helpers
48 4 15 31 5
DockerMain.scala
in ProxyStatsGathering/src/main/scala
61 3 15 25 8
116 4 14 12 7
ProxyLocationDAO.scala
in common/src/main/scala/com/theguardian/multimedia/archivehunter/common
72 3 14 19 5
IsGlacierBranch.scala
in ProxyStatsGathering/src/main/scala/StreamComponents
59 1 14 24 14
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...