firebase / firebase-functions-test
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 39 units with 594 lines of code in units (64.2% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (222 lines of code)
    • 4 medium size units (130 lines of code)
    • 9 small units (137 lines of code)
    • 23 very small units (105 lines of code)
0% | 37% | 21% | 23% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 38% | 22% | 21% | 17%
js0% | 0% | 0% | 78% | 21%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/providers0% | 42% | 23% | 23% | 10%
src0% | 31% | 20% | 17% | 30%
scripts0% | 0% | 0% | 78% | 21%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export function objectToValueProto()
in src/providers/firestore.ts
92 16 1
67 12 1
export function exampleAnalyticsEvent()
in src/providers/analytics.ts
63 1 0
43 10 3
export function clearFirestoreData()
in src/providers/firestore.ts
34 5 1
export function exampleObjectMetadata()
in src/providers/storage.ts
27 1 0
26 1 0
19 3 2
19 4 2
fields: objectToValueProto()
in src/providers/firestore.ts
17 2 1
function dateToTimestampProto()
in src/providers/firestore.ts
16 3 1
createTime: dateToTimestampProto()
in src/providers/firestore.ts
16 2 3
export function makeDataSnapshot()
in src/providers/database.ts
13 2 4
updateTime: dateToTimestampProto()
in src/providers/firestore.ts
13 2 3
export function exampleDocumentSnapshot()
in src/providers/firestore.ts
13 1 0
function printUsage()
in scripts/tweet.js
11 1 0
cleanup()
in src/lifecycle.ts
10 2 0
export function exampleUserRecord()
in src/providers/auth.ts
10 1 0
10 1 0
9 1 2