File Complexity Overall
  • There are 81 files with units, with 4,620 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; 762 lines of code)
    • 79 simple files (McCabe index sum 1-25; 3,858 lines of code)
  • 61 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 0% | 16% | 83%
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
ts0% | 0% | 0% | 17% | 82%
js0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
src0% | 0% | 0% | 17% | 82%
tools0% | 0% | 0% | 0% | 100%
ROOT0% | 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
gu-load-balanced-app.ts
in src/experimental/patterns
662 5 40 6 35
developer-policy.ts
in src/constructs/iam/policies
100 6 28 28 16
ec2-app.ts
in src/experimental/patterns
283 10 25 9 5
base.ts
in src/patterns/ec2-app
343 4 23 7 18
index.ts
in src/riff-raff-yaml-file
213 7 17 8 6
stack.ts
in src/constructs/core
94 5 11 12 6
lambda.ts
in src/constructs/lambda
105 3 10 10 5
cloudformation.ts
in src/riff-raff-yaml-file/deployments
71 3 9 13 5
s3.ts
in src/constructs/core/parameters
46 5 9 20 3
application-listener.ts
in src/constructs/loadbalancing/alb
41 4 9 22 6
valid-constructors.js
in tools/eslint/rules
132 2 8 6 7
ecs-task.ts
in src/constructs/ecs
207 2 8 4 5
base.ts
in src/constructs/ec2/security-groups
49 5 8 16 4
vpc.ts
in src/constructs/ec2
66 5 8 12 3
parameter-store-read.ts
in src/constructs/iam/policies
49 5 7 14 3
event-source.ts
in src/utils/lambda
45 5 6 13 2
application-load-balancer.ts
in src/constructs/loadbalancing/alb
58 2 6 10 5
user-data.ts
in src/constructs/autoscaling
64 4 6 9 2
asg.ts
in src/constructs/autoscaling
121 2 6 5 5
group-by.ts
in src/riff-raff-yaml-file
19 5 5 26 1
base.ts
in src/constructs/core/parameters
35 3 5 14 3
vpc.ts
in src/constructs/core/parameters
27 3 5 19 3
s3-get-object.ts
in src/constructs/iam/policies
43 5 5 12 1
experimental-classes.js
in tools/eslint/rules
32 2 4 13 3
riff-raff-deployment-id.ts
in src/experimental/constructs
18 2 4 22 3
app-aware-construct.ts
in src/utils/mixin
23 2 4 17 3
exec.ts
in src/utils
34 2 4 12 2
anghammarad.ts
in src/constructs/core/parameters
20 2 4 20 3
fastly.ts
in src/constructs/core/parameters
20 2 4 20 3
log-shipping.ts
in src/constructs/core/parameters
20 2 4 20 3
ssm-ssh.ts
in src/constructs/iam/policies
34 2 4 12 3
anghammarad.ts
in src/constructs/iam/policies
20 2 4 20 3
describe-ec2.ts
in src/constructs/iam/policies
30 2 4 13 3
log-shipping.ts
in src/constructs/iam/policies
23 2 4 17 3
vpc.ts
in src/constructs/vpc
42 2 4 10 3
index.ts
in src/constructs/ses
39 3 4 10 2
dns-records.ts
in src/constructs/dns
55 2 4 7 3
instance.ts
in src/constructs/rds
33 2 4 12 3
17 1 4 24 4
metadata.ts
in src/aspects
20 2 4 20 3
sns-lambda.ts
in src/experimental/patterns
37 1 3 8 3
kinesis-lambda.ts
in src/experimental/patterns
52 1 3 6 3
scheduled-lambda.ts
in src/patterns
33 1 3 9 3
54 2 3 6 2
framework.ts
in src/patterns/ec2-app
29 3 3 10 1
git.ts
in src/utils
17 2 3 18 2
ec2-alarms.ts
in src/constructs/cloudwatch
95 3 3 3 1
application-target-group.ts
in src/constructs/loadbalancing/alb
34 2 3 9 2
instance-role.ts
in src/constructs/iam/roles
38 2 3 8 2
kcl.ts
in src/constructs/iam/policies
57 3 3 5 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...