File Complexity Overall
  • There are 34 files with units, with 2,611 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)
    • 2 slightly complex files (McCabe index sum 26-50; 259 lines of code)
    • 32 simple files (McCabe index sum 1-25; 2,352 lines of code)
  • 20 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 0% | 9% | 90%
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% | 14% | 85%
js0% | 0% | 0% | 6% | 93%
ts0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
app0% | 0% | 0% | 14% | 85%
public0% | 0% | 0% | 6% | 93%
cdk0% | 0% | 0% | 0% | 100%
Most Complex Files (Top 34)

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
ContentSourceApi.scala
in app/com/gu/floodgate/contentsource
182 11 35 19 11
reindexForm.react.js
in public/components
77 9 26 34 6
bulkReindexController.react.js
in public/components
194 13 25 13 9
ProgressTracker.scala
in app/com/gu/floodgate/reindex
173 8 21 12 5
contentSourceCreate.react.js
in public/components
202 14 19 9 5
contentSourceEdit.react.js
in public/components
101 10 17 17 8
ReindexService.scala
in app/com/gu/floodgate/reindex
92 5 14 15 4
Progress.scala
in app/com/gu/floodgate/reindex
25 2 13 52 7
reindexController.react.js
in public/components
178 9 13 7 3
runningReindex.react.js
in public/components
109 7 13 12 5
BulkJobActor.scala
in app/com/gu/floodgate/reindex
239 2 11 5 7
ContentSource.scala
in app/com/gu/floodgate/contentsource
94 5 6 6 2
ProgressTrackerController.scala
in app/com/gu/floodgate/reindex
43 3 6 14 3
ContentSourceService.scala
in app/com/gu/floodgate/contentsource
25 2 5 20 3
jobHistoryDateRange.react.js
in public/components
28 4 5 18 2
bulkReindexes.react.js
in public/components
92 3 5 5 3
floodgate.ts
in cdk/lib
128 1 4 3 4
RunningJobApi.scala
in app/com/gu/floodgate/runningjob
24 2 4 17 3
Formats.scala
in app/com/gu/floodgate
46 2 4 9 3
RunningJobService.scala
in app/com/gu/floodgate/runningjob
31 1 3 10 3
DateParameters.scala
in app/com/gu/floodgate/reindex
18 1 3 17 3
Application.scala
in app/com/gu/floodgate
50 3 3 6 1
DynamoDBTable.scala
in app/com/gu/floodgate
61 3 3 5 1
reactApp.react.js
in public/components
32 2 2 6 1
contentSource.react.js
in public/components
21 2 2 10 1
datastore.ts
in cdk/lib
56 1 1 2 1
AppComponents.scala
in app/com/gu/floodgate
128 1 1 1 1
Controller.scala
in app/com/gu/floodgate
13 1 1 8 1
AppLoader.scala
in app/com/gu/floodgate
12 1 1 8 1
jobHistory.react.js
in public/components
41 1 1 2 1
register.react.js
in public/components
29 1 1 3 1
navigationPills.react.js
in public/components
22 1 1 5 1
navigation.react.js
in public/components
36 1 1 3 1
home.react.js
in public/components
9 1 1 11 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...