aws-amplify / amplify-ui
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 230 units with 3,102 lines of code in units (5.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 5 medium complex units (484 lines of code)
    • 6 simple units (336 lines of code)
    • 219 very simple units (2,282 lines of code)
0% | 0% | 15% | 10% | 73%
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
tsx0% | 0% | 46% | 28% | 25%
ts0% | 0% | 5% | 5% | 88%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
packages/react0% | 0% | 48% | 27% | 24%
packages/ui0% | 0% | 2% | 5% | 92%
packages/angular0% | 0% | 0% | 0% | 100%
packages/vue0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export function FormFields()
in packages/react/src/components/Authenticator/SignUp/FormFields.tsx
192 21 0
export function FormFields()
in packages/react/src/components/Authenticator/ForceNewPassword/FormFields.tsx
153 20 0
async signUp()
in packages/ui/src/machines/authenticator/signUp.ts
34 18 2
rowFromSpanValue: convertGridSpan()
in packages/react/src/primitives/shared/styleUtils.ts
53 11 1
columnFromSpanValue: convertGridSpan()
in packages/react/src/primitives/shared/styleUtils.ts
52 11 1
export function useControllable()
in packages/react/src/hooks/useControllable.ts
45 10 7
async validateConfirmPassword()
in packages/ui/src/machines/authenticator/defaultServices.ts
22 10 2
export function ConfirmSignUp()
in packages/react/src/components/Authenticator/ConfirmSignUp/ConfirmSignUp.tsx
82 7 0
export function FederatedSignIn()
in packages/react/src/components/Authenticator/FederatedSignIn/FederatedSignIn.tsx
64 7 0
export function SignUp()
in packages/react/src/components/Authenticator/SignUp/SignUp.tsx
65 6 0
export function createTheme()
in packages/ui/src/theme/createTheme.ts
58 6 2
export function SignIn()
in packages/react/src/components/Authenticator/SignIn/SignIn.tsx
70 5 0
export function cssValue()
in packages/ui/src/theme/utils.ts
25 4 1
function setupTokens()
in packages/ui/src/theme/createTheme.ts
13 4 2
function createValues()
in packages/vue/src/composables/useAuth.ts
10 3 0
async confirmSignIn()
in packages/ui/src/machines/authenticator/actors/signIn.ts
12 3 2
public get confirmSignUpHeading()
in packages/angular/projects/ui-angular/src/lib/components/authenticator/components/confirm-sign-up/confirm-sign-up.component.ts
8 3 0
public get subtitleText()
in packages/angular/projects/ui-angular/src/lib/components/authenticator/components/confirm-sign-up/confirm-sign-up.component.ts
11 3 0
onInput()
in packages/angular/projects/ui-angular/src/lib/components/authenticator/components/sign-up/sign-up.component.ts
5 3 1
togglePasswordText()
in packages/angular/projects/ui-angular/src/lib/primitives/password-field/password-field.component.ts
7 3 0