firebase / firebase-admin-node
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 686 units with 9,112 lines of code in units (69.6% of code).
    • 6 very long units (772 lines of code)
    • 12 long units (827 lines of code)
    • 96 medium size units (2,805 lines of code)
    • 163 small units (2,450 lines of code)
    • 409 very small units (2,258 lines of code)
8% | 9% | 30% | 26% | 24%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts8% | 9% | 31% | 27% | 23%
js0% | 0% | 16% | 18% | 65%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/auth24% | 8% | 28% | 21% | 17%
src/remote-config0% | 44% | 17% | 25% | 13%
src/messaging0% | 20% | 46% | 22% | 10%
src/app0% | 8% | 22% | 29% | 39%
src/utils0% | 0% | 30% | 34% | 35%
src/project-management0% | 0% | 48% | 24% | 27%
src/machine-learning0% | 0% | 28% | 34% | 37%
src/app-check0% | 0% | 36% | 31% | 32%
src/security-rules0% | 0% | 21% | 49% | 28%
src/database0% | 0% | 29% | 40% | 29%
src/storage0% | 0% | 68% | 17% | 13%
ROOT0% | 0% | 38% | 15% | 45%
src/firestore0% | 0% | 46% | 23% | 30%
src/installations0% | 0% | 32% | 23% | 44%
docgen0% | 0% | 0% | 20% | 79%
src/instance-id0% | 0% | 0% | 40% | 59%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private populateOptions()
in src/auth/user-import-builder.ts
172 38 2
function validateCreateEditRequest()
in src/auth/auth-api-request.ts
150 51 2
public updateExistingAccount()
in src/auth/auth-api-request.ts
121 25 2
public static validate()
in src/auth/auth-config.ts
117 34 2
host: emulatorHost()
in src/auth/auth-api-request.ts
107 35 0
public static validate()
in src/auth/auth-config.ts
105 32 2
public readonly updateOrigin?:()
in src/remote-config/remote-config.ts
85 20 1
function validateAndroidNotification()
in src/messaging/messaging-internal.ts
84 19 1
constructor()
in src/auth/action-code-settings-builder.ts
83 22 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 populateUploadAccountUser()
in src/auth/user-import-builder.ts
73 17 2
private validateMessagingPayload()
in src/messaging/messaging.ts
66 14 1
private validateMessagingOptions()
in src/messaging/messaging.ts
63 28 1
function extendApp()
in src/app/firebase-namespace.ts
56 2 1
public createCustomToken()
in src/auth/token-generator.ts
55 11 2
public createNewAccount()
in src/auth/auth-api-request.ts
51 9 1
private validateListVersionsOptions()
in src/remote-config/remote-config-api-client-internal.ts
51 17 1
constructor()
in src/storage/storage.ts
50 9 1
function validateAuthFactorInfo()
in src/auth/auth-api-request.ts
48 16 1