aws-samples / cognito-at-edge-federated-ui-sample
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 20 units with 251 lines of code in units (19.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 1 simple units (38 lines of code)
    • 19 very simple units (213 lines of code)
0% | 0% | 0% | 15% | 84%
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% | 0% | 24% | 75%
tsx0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
web/src/hooks0% | 0% | 0% | 66% | 33%
web/src/components0% | 0% | 0% | 0% | 100%
infrastructure/lib/constructs0% | 0% | 0% | 0% | 100%
infrastructure/lib/helpers0% | 0% | 0% | 0% | 100%
web/src/services0% | 0% | 0% | 0% | 100%
web/src0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function useAuthenticator()
in web/src/hooks/authenticator.ts
38 8 0
public static async handleAsync()
in infrastructure/lib/helpers/async-handler.ts
23 2 6
3 1 0
function handleItemClick()
in web/src/components/layout/page-header/user-selector.tsx
3 1 0
function useNotifications()
in web/src/components/layout/notifications/notifications.logic.ts
8 1 0
function showErrorNotification()
in web/src/components/layout/notifications/notifications.logic.ts
12 1 2
function removeNotification()
in web/src/components/layout/notifications/notifications.logic.ts
3 1 1
function buildItems()
in web/src/components/layout/breadcrumb/breadcrumb.tsx
3 1 0
function getItems()
in web/src/components/pages/sample/sample.tsx
11 1 0
function getBreadcrumbItems()
in web/src/components/pages/sample/sample.tsx
6 1 0
function renderContent()
in web/src/components/pages/sample/sample.tsx
35 1 0
function renderBreadcrumb()
in web/src/components/pages/sample/sample.tsx
3 1 0
function renderTools()
in web/src/components/pages/sample/sample.tsx
21 1 0
function renderAuthPendingNotification()
in web/src/components/pages/home/home.tsx
8 1 0
resourcePath: async()
in web/src/services/API/my-app-api.ts
8 1 0
function getUser()
in web/src/hooks/authenticator.ts
13 1 0
function inititateAuth()
in web/src/hooks/authenticator.ts
3 1 0
function initiateSignOut()
in web/src/hooks/authenticator.ts
3 1 0
constructor()
in infrastructure/lib/constructs/identity-pool.ts
28 1 3
constructor()
in infrastructure/lib/constructs/user-pool-identity-provider-oidc.ts
19 1 3