firebase / firebaseui-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 1,083 units with 9,638 lines of code in units (50.5% of code).
    • 1 very long units (108 lines of code)
    • 9 long units (635 lines of code)
    • 82 medium size units (2,482 lines of code)
    • 166 small units (2,343 lines of code)
    • 825 very small units (4,070 lines of code)
1% | 6% | 25% | 24% | 42%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js1% | 6% | 25% | 24% | 42%
py0% | 0% | 0% | 21% | 78%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
javascript/widgets2% | 10% | 33% | 19% | 34%
javascript/ui0% | 2% | 18% | 30% | 48%
javascript/testing0% | 0% | 28% | 36% | 34%
javascript/utils0% | 0% | 10% | 28% | 60%
ROOT0% | 0% | 31% | 32% | 35%
javascript/data0% | 0% | 0% | 45% | 54%
buildtools/country_data0% | 0% | 0% | 87% | 12%
buildtools0% | 0% | 0% | 17% | 82%
firebase-externs0% | 0% | 0% | 0% | 100%
soy0% | 0% | 0% | 0% | 100%
javascript/externs0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function setUp()
in javascript/widgets/handler/testhelper.js
108 8 0
selectTenant()
in javascript/widgets/firebaseuihandler.js
94 14 2
function()
in javascript/widgets/handler/common.js
83 11 7
function doDispatchOperation()
in javascript/widgets/dispatcher.js
79 13 2
function()
in javascript/widgets/handler/callback.js
71 20 3
firebaseui.auth.widget.handler.completeEmailLinkSignIn_ = function()
in javascript/widgets/handler/emaillinksignincallback.js
66 8 6
startSignIn()
in javascript/widgets/firebaseuihandler.js
64 16 2
function()
in javascript/ui/element/phonenumbertesthelper.js
62 1 0
getPhoneAuthAvailableCountries()
in javascript/widgets/config.js
60 20 0
function()
in javascript/widgets/handler/callback.js
56 6 4
var cb = function()
in javascript/widgets/authui.js
50 15 1
var signInResultErrorCallback = function()
in javascript/widgets/handler/common.js
50 12 1
49 9 0
firebaseui.auth.widget.handler.handlePhoneSignInStart = function()
in javascript/widgets/handler/phonesigninstart.js
49 14 4
element.phoneNumber.initPhoneNumberElement = function()
in javascript/ui/element/phonenumber.js
48 10 3
function()
in javascript/widgets/handler/phonesigninstart.js
48 11 1
function()
in javascript/widgets/handler/passwordsignup.js
47 9 1
function()
in javascript/widgets/handler/callback.js
45 7 3
function()
in javascript/widgets/handler/common.js
45 13 3
45 26 1