File Complexity Overall
  • There are 24 files with units, with 1,598 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; 294 lines of code)
    • 1 slightly complex files (McCabe index sum 26-50; 313 lines of code)
    • 22 simple files (McCabe index sum 1-25; 991 lines of code)
  • 16 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 18% | 19% | 62%
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% | 18% | 19% | 62%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
api0% | 0% | 18% | 19% | 62%
Most Complex Files (Top 24)

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
store.scala
in api/src/main/scala/com/gu/core/store
294 20 56 19 11
Store.scala
in api/src/main/scala/com/gu/adapters/store
313 16 31 10 6
AvatarServlet.scala
in api/src/main/scala/com/gu/adapters/http
240 6 21 9 8
Filter.scala
in api/src/main/scala/com/gu/adapters/http
58 2 20 34 18
Authentication.scala
in api/src/main/scala/com/gu/adapters/http
150 6 18 12 5
ErrorHandling.scala
in api/src/main/scala/com/gu/core/utils
40 5 11 28 3
Image.scala
in api/src/main/scala/com/gu/adapters/http
42 4 10 24 5
errors.scala
in api/src/main/scala/com/gu/core/models
59 7 7 12 1
Links.scala
in api/src/main/scala/com/gu/adapters/http
18 1 7 39 7
Notifications.scala
in api/src/main/scala/com/gu/adapters/notifications
53 4 6 11 2
statuses.scala
in api/src/main/scala/com/gu/core/models
14 1 5 36 5
responses.scala
in api/src/main/scala/com/gu/adapters/http
39 5 5 13 1
IOUtils.scala
in api/src/main/scala/com/gu/adapters/http
29 3 4 14 2
order.scala
in api/src/main/scala/com/gu/core/models
10 1 3 30 3
SqsDeletionConsumer.scala
in api/src/main/scala/com/gu/adapters/queue
56 2 3 5 2
ScalatraBootstrap.scala
in api/src/main/scala
31 2 2 6 1
utils.scala
in api/src/main/scala/com/gu/core/utils
15 2 2 13 1
DeletionEvent.scala
in api/src/main/scala/com/gu/core/models
23 1 2 9 2
Config.scala
in api/src/main/scala/com/gu/adapters/config
51 2 2 4 1
Pekko.scala
in api/src/main/scala/com/gu/core/pekko
15 1 1 7 1
User.scala
in api/src/main/scala/com/gu/core/models
11 1 1 9 1
AuthorizedApiServlet.scala
in api/src/main/scala/com/gu/adapters/http
15 1 1 7 1
Req.scala
in api/src/main/scala/com/gu/adapters/http
9 1 1 11 1
ServletWithErrorHandling.scala
in api/src/main/scala/com/gu/adapters/http
13 1 1 8 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...