firebase / quickstart-nodejs
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 27 units with 353 lines of code in units (40.8% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (109 lines of code)
    • 11 small units (167 lines of code)
    • 12 very small units (77 lines of code)
0% | 0% | 30% | 47% | 21%
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% | 30% | 47% | 21%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
messaging0% | 0% | 57% | 39% | 2%
auth-sessions0% | 0% | 33% | 39% | 26%
config0% | 0% | 42% | 42% | 15%
database0% | 0% | 0% | 65% | 34%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function serveContentForUser()
in auth-sessions/app.js
38 4 4
27 2 0
getAccessToken()
in messaging/index.js
23 1 0
function buildOverrideMessage()
in messaging/index.js
21 1 0
function startListeners()
in database/index.js
20 1 0
20 2 2
function getAccessToken()
in messaging/index.js
19 2 0
function getUiConfig()
in auth-sessions/script.js
18 1 0
15 1 0
function checkIfSignedIn()
in auth-sessions/app.js
14 3 1
function publishTemplate()
in config/index.js
14 1 0
function getTemplate()
in config/index.js
13 1 0
const handleSignedInUser = function()
in auth-sessions/script.js
12 1 1
function buildCommonMessage()
in messaging/index.js
11 1 0
11 1 1
10 2 2
function getAccessToken()
in config/index.js
10 1 0
9 1 1
sendNotificationEmail()
in database/index.js
8 1 1
function updateStarCount()
in database/index.js
8 3 1