firebase / firebase-admin-node
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 686 units with 9,112 lines of code in units (69.6% of code).
    • 1 very complex units (150 lines of code)
    • 5 complex units (564 lines of code)
    • 23 medium complex units (1,228 lines of code)
    • 57 simple units (1,621 lines of code)
    • 600 very simple units (5,549 lines of code)
1% | 6% | 13% | 17% | 60%
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
ts1% | 6% | 13% | 18% | 60%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/auth4% | 15% | 18% | 18% | 43%
src/messaging0% | 6% | 23% | 22% | 47%
src/remote-config0% | 0% | 44% | 13% | 42%
src/utils0% | 0% | 4% | 21% | 74%
src/machine-learning0% | 0% | 9% | 11% | 78%
src/app0% | 0% | 0% | 22% | 77%
src/security-rules0% | 0% | 0% | 22% | 77%
src/storage0% | 0% | 0% | 68% | 31%
src/project-management0% | 0% | 0% | 8% | 91%
src/app-check0% | 0% | 0% | 14% | 85%
src/firestore0% | 0% | 0% | 46% | 53%
src/database0% | 0% | 0% | 0% | 100%
docgen0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
src/installations0% | 0% | 0% | 0% | 100%
src/instance-id0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function validateCreateEditRequest()
in src/auth/auth-api-request.ts
150 51 2
private populateOptions()
in src/auth/user-import-builder.ts
172 38 2
host: emulatorHost()
in src/auth/auth-api-request.ts
107 35 0
public static validate()
in src/auth/auth-config.ts
117 34 2
public static validate()
in src/auth/auth-config.ts
105 32 2
private validateMessagingOptions()
in src/messaging/messaging.ts
63 28 1
public updateExistingAccount()
in src/auth/auth-api-request.ts
121 25 2
constructor()
in src/auth/action-code-settings-builder.ts
83 22 1
public readonly updateOrigin?:()
in src/remote-config/remote-config.ts
85 20 1
public readonly updateType?:()
in src/remote-config/remote-config.ts
83 20 1
constructor()
in src/remote-config/remote-config.ts
77 20 1
function validateAndroidNotification()
in src/messaging/messaging-internal.ts
84 19 1
private verifyContent()
in src/auth/token-verifier.ts
47 18 3
function populateUploadAccountUser()
in src/auth/user-import-builder.ts
73 17 2
private validateListVersionsOptions()
in src/remote-config/remote-config-api-client-internal.ts
51 17 1
public static fromOperationError()
in src/machine-learning/machine-learning-utils.ts
21 16 2
function validateAuthFactorInfo()
in src/auth/auth-api-request.ts
48 16 1
function validateProviderUserInfo()
in src/auth/auth-api-request.ts
43 15 1
constructor()
in src/auth/auth-config.ts
36 14 1
private validateMessagingPayload()
in src/messaging/messaging.ts
66 14 1