File Complexity Overall
  • There are 64 files with units, with 6,648 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)
    • 3 medium complex files (McCabe index sum 51-125; 1,425 lines of code)
    • 4 slightly complex files (McCabe index sum 26-50; 742 lines of code)
    • 57 simple files (McCabe index sum 1-25; 4,481 lines of code)
  • 104 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 21% | 11% | 67%
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% | 27% | 14% | 57%
ts0% | 0% | 0% | 0% | 100%
tsx0% | 0% | 0% | 0% | 100%
java0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
apps0% | 0% | 22% | 11% | 65%
cdk0% | 0% | 0% | 0% | 100%
script0% | 0% | 0% | 0% | 100%
project0% | 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
RulesController.scala
in apps/rule-manager/app/controllers
298 16 74 25 7
RuleManager.scala
in apps/rule-manager/app/service
517 16 67 13 10
DbRuleDraft.scala
in apps/rule-manager/app/db
610 21 55 9 20
MatcherPool.scala
in apps/checker/app/services
297 19 39 13 6
DictionaryBuilder.scala
in apps/checker/app/services/collins
177 6 28 16 12
MatcherProvisionerService.scala
in apps/checker/app/services
91 6 27 30 11
LanguageToolMatcher.scala
in apps/checker/app/matchers
177 9 26 15 7
SheetsRuleResource.scala
in apps/rule-manager/app/service
149 6 24 16 11
useRule.ts
in apps/rule-manager/client/src/ts/components/hooks
308 1 24 8 24
Tags.scala
in apps/rule-manager/app/db
155 14 20 13 5
CheckerRule.scala
in apps/common-lib/src/main/scala/com/gu/typerighter/model
180 6 17 9 5
Dictionary.scala
in apps/rule-manager/app/utils
95 7 16 17 6
useBatchRules.ts
in apps/rule-manager/client/src/ts/components/hooks
90 1 15 17 15
ApiController.scala
in apps/checker/app/controllers
78 4 15 19 5
SpellDictionaryBuilder.scala
in apps/checker/app/services/collins
75 3 15 20 10
DbRuleLive.scala
in apps/rule-manager/app/db
305 12 14 5 3
PaginatedRulesTable.tsx
in apps/rule-manager/client/src/ts/components/table
407 4 14 3 8
TagsController.scala
in apps/rule-manager/app/controllers
89 3 13 15 7
RuleTagDraft.scala
in apps/rule-manager/app/db
107 10 12 11 3
RuleTagLive.scala
in apps/rule-manager/app/db
132 10 12 9 3
RuleTesting.scala
in apps/rule-manager/app/service
143 2 12 8 6
useRules.ts
in apps/rule-manager/client/src/ts/components/hooks
138 1 10 7 10
TextRange.scala
in apps/common-lib/src/main/scala/com/gu/typerighter/model
40 3 10 25 4
BucketRuleResource.scala
in apps/common-lib/src/main/scala/com/gu/typerighter/rules
116 4 10 9 5
RuleMatch.scala
in apps/common-lib/src/main/scala/com/gu/typerighter/model
75 3 8 11 4
dump-db.ts
in script/js
97 2 7 7 5
HomeController.scala
in apps/rule-manager/app/controllers
58 3 7 12 3
DictionaryMatcher.scala
in apps/checker/app/matchers
81 3 7 9 5
SentenceHelpers.scala
in apps/checker/app/services
52 2 7 13 5
DictionaryResource.scala
in apps/rule-manager/app/service
67 2 6 9 3
RuleDataLastUpdated.tsx
in apps/rule-manager/client/src/ts/components
37 1 6 16 6
RegexMatcher.scala
in apps/checker/app/matchers
53 4 5 9 2
EntityHelper.scala
in apps/checker/app/services
63 1 5 8 5
Suggestion.scala
in apps/common-lib/src/main/scala/com/gu/typerighter/model
31 1 5 16 5
TextBlock.scala
in apps/common-lib/src/main/scala/com/gu/typerighter/model
67 2 5 7 3
ContentClient.scala
in apps/common-lib/src/main/scala/com/gu/typerighter/lib
32 3 5 16 3
AppSetup.scala
in apps/common-lib/src/main/scala/com/gu/typerighter/lib
42 1 5 12 5
15 1 4 27 4
Permissions.scala
in apps/rule-manager/app/utils
53 2 4 8 3
CheckerRuleForm.scala
in apps/rule-manager/app/model
105 4 4 4 1
Timer.scala
in apps/checker/app/utils
59 3 4 7 2
MorfologikCollinsSpellerRule.java
in apps/checker/app/services/collins
32 4 4 13 1
RuleMatchHelpers.scala
in apps/checker/app/utils
14 1 3 21 3
CloudWatchClient.scala
in apps/checker/app/utils
44 1 3 7 3
HomeController.scala
in apps/checker/app/controllers
39 2 3 8 2
CapiProxyController.scala
in apps/checker/app/controllers
35 3 3 9 1
CollinsEnglish.java
in apps/checker/app/services/collins
29 3 3 10 1
Category.scala
in apps/common-lib/src/main/scala/com/gu/typerighter/model
14 2 2 14 1
index.ts
in cdk/lib
284 1 1 0 1
FormHelpers.scala
in apps/rule-manager/app/utils
18 1 1 6 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...