File Complexity Overall
  • There are 20 files with units, with 1,292 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; 522 lines of code)
    • 18 simple files (McCabe index sum 1-25; 770 lines of code)
  • 11 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 0% | 40% | 59%
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% | 41% | 58%
ts0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
client0% | 0% | 0% | 62% | 37%
client-cats-effect0% | 0% | 0% | 0% | 100%
firehose-client0% | 0% | 0% | 0% | 100%
client-default0% | 0% | 0% | 0% | 100%
cdk0% | 0% | 0% | 0% | 100%
Most Complex Files (Top 20)

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
Queries.scala
in client/src/main/scala/com.gu.contentapi.client/model
309 21 39 13 3
CapiModelEnrichment.scala
in client/src/main/scala/com.gu.contentapi.client/utils
213 6 26 12 16
ContentApiClient.scala
in client/src/main/scala/com.gu.contentapi.client
92 6 16 17 4
Parameters.scala
in client/src/main/scala/com.gu.contentapi.client
47 9 15 32 3
BackoffStrategy.scala
in client/src/main/scala/com.gu.contentapi.client
87 4 13 15 6
ContentApiFirehoseConsumer.scala
in firehose-client/src/main/scala/com/gu/contentapi/firehose
47 2 12 26 11
SingleEventProcessor.scala
in firehose-client/src/main/scala/com/gu/contentapi/firehose/kinesis
75 7 11 15 4
IOCapiClient.scala
in client-cats-effect/src/main/scala/com/gu/contentapi/client/catseffect
62 5 7 11 2
Retrying.scala
in client-cats-effect/src/main/scala/com/gu/contentapi/client/catseffect
37 1 5 14 5
GuardianContentClient.scala
in client-default/src/main/scala/com.gu.contentapi.client
42 3 4 10 2
RequestSizing.scala
in client-cats-effect/src/main/scala/com/gu/contentapi/client/catseffect/bulkqueries
49 4 4 8 1
KinesisStreamReader.scala
in firehose-client/src/main/scala/com/gu/contentapi/firehose/kinesis
64 3 3 5 1
QueryStringParams.scala
in client/src/main/scala/com.gu.contentapi.client/utils
12 1 3 25 3
TokenBucket.scala
in client-cats-effect/src/main/scala/com/gu/contentapi/client/catseffect
25 1 2 8 2
24 1 1 4 1
BulkContentRequester.scala
in client-cats-effect/src/main/scala/com/gu/contentapi/client/catseffect/bulkqueries
33 1 1 3 1
ThriftDeserializer.scala
in client/src/main/scala/com.gu.contentapi.client/thrift
13 1 1 8 1
Decoder.scala
in client/src/main/scala/com.gu.contentapi.client/model
27 1 1 4 1
ContentApiError.scala
in client/src/main/scala/com.gu.contentapi.client/model
11 1 1 9 1
ScheduledExecutor.scala
in client/src/main/scala/com.gu.contentapi.client
23 1 1 4 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...