firebase / snippets-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 165 units with 1,812 lines of code in units (62.0% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 14 medium size units (417 lines of code)
    • 43 small units (653 lines of code)
    • 108 very small units (742 lines of code)
0% | 0% | 23% | 36% | 40%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 0% | 23% | 36% | 40%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
messaging0% | 0% | 40% | 54% | 4%
firestore/solution-sharded-timestamp0% | 0% | 64% | 6% | 28%
firestore/main0% | 0% | 16% | 35% | 47%
management0% | 0% | 46% | 47% | 6%
database0% | 0% | 0% | 29% | 70%
config0% | 0% | 0% | 54% | 45%
auth0% | 0% | 0% | 86% | 13%
firestore/extend-with-functions0% | 0% | 0% | 22% | 77%
firebaseapp0% | 0% | 0% | 20% | 79%
firestore/solution-deletes0% | 0% | 0% | 28% | 71%
storage0% | 0% | 0% | 0% | 100%
functions/stackdriver-logging0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
async function collectionGroupQuery()
in firestore/main/index.js
47 1 1
async function insertData()
in firestore/solution-sharded-timestamp/nonShardedTimestamps.js
43 2 0
36 1 0
function createQuery()
in firestore/solution-sharded-timestamp/shardedTimestamps.js
33 3 4
33 1 0
30 1 0
async function listProjects()
in management/pre_firebase.js
29 3 0
async function exampleData()
in firestore/main/index.js
28 1 1
async function insertData()
in firestore/solution-sharded-timestamp/shardedTimestamps.js
28 2 0
async function exampleDataTwo()
in firestore/main/index.js
23 1 1
function notificationMessage()
in messaging/index.js
23 1 0
function sendMulticast()
in messaging/index.js
22 3 0
async function addIosApp()
in management/post_firebase.js
21 2 3
async function addAndroidApp()
in management/post_firebase.js
21 2 3
async function transaction()
in firestore/main/index.js
20 2 1
async function addWebApp()
in management/post_firebase.js
20 2 2
async function finalizeProjectLocation()
in management/post_firebase.js
20 2 2
function messageOptions()
in messaging/index.js
20 1 0
async function transactionWithResult()
in firestore/main/index.js
19 3 1
function customClaimsServer()
in auth/custom_claims.js
19 5 0