aws-solutions / liveness-detection-framework
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 97 units with 1,218 lines of code in units (37.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (77 lines of code)
    • 10 simple units (313 lines of code)
    • 86 very simple units (828 lines of code)
0% | 0% | 6% | 25% | 67%
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
py0% | 0% | 15% | 40% | 44%
tsx0% | 0% | 0% | 23% | 76%
ts0% | 0% | 0% | 10% | 89%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/backend/chalicelib0% | 0% | 15% | 40% | 43%
source/client/src/liveness/nose0% | 0% | 0% | 38% | 61%
source/client/src/liveness/components0% | 0% | 0% | 43% | 56%
source/client/src/liveness/utils0% | 0% | 0% | 0% | 100%
source/client/src/liveness/pose0% | 0% | 0% | 0% | 100%
source/client/src/liveness0% | 0% | 0% | 0% | 100%
source/backend0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def nose_state()
in source/backend/chalicelib/nose.py
77 23 3
def verify_challenge_response()
in source/backend/chalicelib/framework.py
60 10 1
def challenge_state()
in source/backend/chalicelib/framework.py
25 9 4
def _get_eyes_coordinates()
in source/backend/chalicelib/pose.py
17 8 1
render()
in source/client/src/liveness/nose/NoseChallenge.tsx
46 7 0
private processDetectionResults()
in source/client/src/liveness/nose/NoseChallengeProcessor.ts
42 7 1
def put_challenge_frame()
in source/backend/chalicelib/framework.py
43 7 1
def _are_eyes_correct()
in source/backend/chalicelib/pose.py
18 7 2
render()
in source/client/src/liveness/components/ResultMessage.tsx
25 6 0
def first_state()
in source/backend/chalicelib/pose.py
30 6 3
def _is_mouth_correct()
in source/backend/chalicelib/pose.py
7 6 2
render()
in source/client/src/liveness/pose/PoseChallenge.tsx
96 5 0
protected isFaceBoxInsideFaceArea()
in source/client/src/liveness/nose/States.ts
11 5 2
def area_state()
in source/backend/chalicelib/nose.py
24 5 3
def create_challenge()
in source/backend/chalicelib/framework.py
23 5 0
protected isNoseInsideNoseArea()
in source/client/src/liveness/nose/States.ts
8 4 1
private process()
in source/client/src/liveness/nose/NoseChallengeProcessor.ts
19 4 0
def _is_inside_area_box()
in source/backend/chalicelib/nose.py
4 4 2
def _is_eye_opposite_direction()
in source/backend/chalicelib/pose.py
3 4 2
draw()
in source/client/src/liveness/nose/OverlayCanvasDrawer.ts
8 3 1