firebase / quickstart-js
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 123 units with 1,343 lines of code in units (18.4% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (70 lines of code)
    • 18 medium size units (500 lines of code)
    • 23 small units (349 lines of code)
    • 81 very small units (424 lines of code)
0% | 5% | 37% | 25% | 31%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 5% | 37% | 25% | 31%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
database/scripts0% | 26% | 8% | 27% | 37%
firestore/scripts0% | 0% | 56% | 19% | 23%
auth0% | 0% | 39% | 22% | 38%
auth/chromextension0% | 0% | 36% | 32% | 31%
functions/public0% | 0% | 0% | 67% | 32%
functions/functions0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function createPostElement()
in database/scripts/main.js
70 4 6
FriendlyEats.prototype.viewRestaurant = function()
in firestore/scripts/FriendlyEats.View.js
43 2 1
function initApp()
in auth/mfa-password.js
38 3 0
FriendlyEats.prototype.initFilterDialog = function()
in firestore/scripts/FriendlyEats.View.js
35 2 0
FriendlyEats.prototype.viewList = function()
in firestore/scripts/FriendlyEats.View.js
34 9 2
var renderResults = function()
in firestore/scripts/FriendlyEats.View.js
32 5 1
FriendlyEats.prototype.viewSetup = function()
in firestore/scripts/FriendlyEats.View.js
32 4 0
FriendlyEats.prototype.addMockRestaurants = function()
in firestore/scripts/FriendlyEats.Mock.js
32 3 0
function updateMfaDialog()
in auth/mfa-password.js
31 4 0
'': function()
in firestore/scripts/FriendlyEats.View.js
25 2 1
FriendlyEats.prototype.updateQuery = function()
in firestore/scripts/FriendlyEats.View.js
24 6 1
FriendlyEats.prototype.initReviewDialog = function()
in firestore/scripts/FriendlyEats.View.js
22 1 0
function FriendlyEats()
in firestore/scripts/FriendlyEats.js
22 1 0
function showEnrolledFactors()
in auth/mfa-password.js
22 3 1
function onEnrollSendCode()
in auth/mfa-password.js
22 4 1
function initApp()
in auth/chromextension/credentials.js
22 2 0
var fetchPosts = function()
in database/scripts/main.js
22 2 2
FriendlyEats.prototype.initRouter = function()
in firestore/scripts/FriendlyEats.js
21 2 0
function onSignInSendCode()
in auth/mfa-password.js
21 3 1
FriendlyEats.prototype.render = function()
in firestore/scripts/FriendlyEats.View.js
20 3 2