File Complexity Overall
  • There are 24 files with units, with 1,308 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)
    • 3 slightly complex files (McCabe index sum 26-50; 511 lines of code)
    • 21 simple files (McCabe index sum 1-25; 797 lines of code)
  • 23 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 0% | 39% | 60%
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
js0% | 0% | 0% | 58% | 41%
scala0% | 0% | 0% | 24% | 75%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
src0% | 0% | 0% | 58% | 41%
app0% | 0% | 0% | 24% | 75%
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
viewer.js
in src/modules/components
216 19 50 23 8
PreviewProxy.scala
in app/com/gu/viewer/proxy
178 8 31 17 8
application.js
in src/modules/controllers
117 11 27 23 5
keyboard.js
in src/modules/controllers
48 2 21 44 19
Proxy.scala
in app/com/gu/viewer/controllers
52 3 13 25 6
localStorage.js
in src/modules/utils
47 8 13 28 4
history.js
in src/modules/controllers
48 3 11 23 5
RequestLoggingFilter.scala
in app/com/gu/viewer/logging
82 2 10 12 9
button.js
in src/modules/utils
40 5 10 25 3
ProxyResult.scala
in app/com/gu/viewer/proxy
52 2 8 15 5
overlay.js
in src/modules/controllers
22 8 8 36 1
ProxyRequest.scala
in app/com/gu/viewer/proxy
32 2 7 22 5
Application.scala
in app/com/gu/viewer/controllers
40 3 6 15 4
LiveProxy.scala
in app/com/gu/viewer/proxy
50 3 4 8 2
ProxyClient.scala
in app/com/gu/viewer/proxy
56 1 4 7 4
Email.scala
in app/com/gu/viewer/controllers
46 2 4 9 3
PreviewSession.scala
in app/com/gu/viewer/proxy
53 3 3 6 1
13 2 2 15 1
PanDomainAuthActions.scala
in app/com/gu/viewer/controllers
12 1 2 17 2
error.js
in src/modules/controllers
15 2 2 13 1
ProxyResponse.scala
in app/com/gu/viewer/proxy
16 1 1 6 1
AppConfig.scala
in app/com/gu/viewer/config
37 1 1 3 1
AwsInstanceTags.scala
in app/com/gu/viewer/aws
22 1 1 5 1
api.js
in src/modules/utils
14 1 1 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...