aws-samples / cdk-cognito-idp
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 50 units with 1,033 lines of code in units (65.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (86 lines of code)
    • 5 simple units (168 lines of code)
    • 44 very simple units (779 lines of code)
0% | 0% | 8% | 16% | 75%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
ts0% | 0% | 8% | 16% | 75%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lambda0% | 0% | 19% | 16% | 64%
lib0% | 0% | 0% | 14% | 85%
web0% | 0% | 0% | 19% | 80%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public async handle()
in lambda/decode-verify-jwt-get.ts
86 15 1
public async handle()
in lambda/user-post.ts
26 10 1
public async getLoggedInUser()
in lambda/handler.ts
21 9 1
public addResource()
in lib/resource-handler.ts
51 8 4
public async aapi()
in web/index.ts
44 7 3
public async handle()
in lambda/user-delete.ts
26 7 1
constructor()
in lib/cognito-idp-stack.ts
175 5 3
public async handle()
in lambda/user-get.ts
18 5 1
9 4 2
21 4 0
public async handle()
in lambda/create-config.ts
43 4 1
private userConvert()
in lambda/database.ts
17 4 1
public async userSave()
in lambda/database.ts
62 4 1
public async handle()
in lambda/userbyusername-get.ts
15 4 1
constructor()
in lib/cognito-rest-api.ts
57 3 3
public logout()
in web/index.ts
12 3 0
22 3 0
public statusChangeCallback()
in web/index-direct.ts
12 3 1
public async handle()
in lambda/users-get.ts
11 3 1
public async usersGet()
in lambda/database.ts
12 3 0