aws-samples / liveness-detection
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 65 units with 638 lines of code in units (41.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 7 medium size units (201 lines of code)
    • 14 small units (214 lines of code)
    • 44 very small units (223 lines of code)
0% | 0% | 31% | 33% | 34%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 35% | 35% | 28%
ts0% | 0% | 26% | 31% | 41%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lambda0% | 0% | 48% | 31% | 19%
client/src/js0% | 0% | 26% | 31% | 41%
lambda/states0% | 0% | 21% | 39% | 39%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def verify_challenge()
in lambda/app.py
39 7 1
def verify_challenge()
in lambda/states/nose.py
33 17 4
29 3 2
reader.onloadend = function()
in client/src/js/RemoteVerifier.ts
28 1 0
static startChallenge()
in client/src/js/RemoteStarter.ts
25 1 1
private callVerificationApi()
in client/src/js/RemoteVerifier.ts
25 1 2
def lambda_handler()
in lambda/app.py
22 7 2
draw()
in client/src/js/Drawer.ts
20 3 1
uploadFrame()
in client/src/js/RemoteVerifier.ts
20 3 0
def __init__()
in lambda/states/nose.py
20 1 3
def get_nose_box()
in lambda/challenge.py
19 3 2
def __init__()
in lambda/challenge.py
17 1 5
static loadMediaStream()
in client/src/js/Utils.ts
16 2 1
static process()
in client/src/js/ChallengeProcessor.ts
16 4 1
def process()
in lambda/states/nose.py
16 3 2
def process()
in lambda/states/manager.py
13 5 2
def get_area_box()
in lambda/challenge.py
12 1 2
def process()
in lambda/states/area.py
12 3 2
static loadModels()
in client/src/js/ChallengeProcessor.ts
11 2 0
static callFramesApi()
in client/src/js/RemoteVerifier.ts
11 1 4