firebase / codelab-friendlychat-web
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 177 units with 1,494 lines of code in units (44.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 12 medium size units (307 lines of code)
    • 44 small units (623 lines of code)
    • 121 very small units (564 lines of code)
0% | 0% | 20% | 41% | 37%
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% | 20% | 41% | 37%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
web-start/src0% | 0% | 31% | 28% | 40%
performance-monitoring/src0% | 0% | 17% | 51% | 31%
performance-monitoring-start/src0% | 0% | 18% | 40% | 41%
web/src0% | 0% | 18% | 40% | 41%
cloud-functions-start/public0% | 0% | 23% | 38% | 38%
cloud-functions/public0% | 0% | 23% | 38% | 38%
cloud-functions/functions0% | 0% | 0% | 90% | 9%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function createAndInsertMessage()
in cloud-functions-start/public/scripts/main.js
28 6 2
function createAndInsertMessage()
in performance-monitoring-start/src/index.js
28 6 2
function createAndInsertMessage()
in cloud-functions/public/scripts/main.js
28 6 2
function createAndInsertMessage()
in performance-monitoring/src/index.js
28 6 2
28 6 2
function createAndInsertMessage()
in web-start/src/index.js
28 6 2
function displayMessage()
in web-start/src/index.js
24 5 6
function displayMessage()
in cloud-functions-start/public/scripts/main.js
23 5 6
function displayMessage()
in performance-monitoring-start/src/index.js
23 5 6
function displayMessage()
in cloud-functions/public/scripts/main.js
23 5 6
function displayMessage()
in performance-monitoring/src/index.js
23 5 6
function displayMessage()
in web/src/index.js
23 5 6
async function saveMessagingDeviceToken()
in performance-monitoring-start/src/index.js
20 3 0
async function saveMessagingDeviceToken()
in performance-monitoring/src/index.js
20 3 0
20 3 0
function authStateObserver()
in web-start/src/index.js
19 2 1
function authStateObserver()
in cloud-functions-start/public/scripts/main.js
18 2 1
function authStateObserver()
in performance-monitoring-start/src/index.js
18 2 1
function authStateObserver()
in cloud-functions/public/scripts/main.js
18 2 1
function authStateObserver()
in performance-monitoring/src/index.js
18 2 1