fbsamples / f8app
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 593 units with 7,326 lines of code in units (53.7% of code).
    • 0 very long units (0 lines of code)
    • 8 long units (506 lines of code)
    • 93 medium size units (2,717 lines of code)
    • 152 small units (2,164 lines of code)
    • 340 very small units (1,939 lines of code)
0% | 6% | 37% | 29% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 6% | 37% | 29% | 26%
java0% | 0% | 0% | 0% | 100%
m0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
js/common0% | 14% | 40% | 24% | 20%
js/tabs0% | 7% | 38% | 32% | 20%
js/actions0% | 0% | 34% | 21% | 43%
js/filter0% | 0% | 50% | 19% | 30%
js/rating0% | 0% | 45% | 32% | 22%
js/reducers0% | 0% | 34% | 31% | 33%
server/parse-server0% | 0% | 16% | 35% | 48%
js/video0% | 0% | 24% | 31% | 44%
js/login0% | 0% | 46% | 43% | 10%
js/store0% | 0% | 45% | 13% | 41%
js0% | 0% | 12% | 46% | 40%
android/app0% | 0% | 0% | 0% | 100%
server/graphql0% | 0% | 0% | 0% | 100%
ios/F820170% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
render()
in js/tabs/F8TabsView.js
86 2 0
render()
in js/common/F8Header.js
68 10 0
render()
in js/common/ListContainer.js
67 3 0
getTheme()
in js/common/F8Button.js
67 11 0
render()
in js/tabs/schedule/GeneralScheduleView.js
58 4 0
render()
in js/common/F8WebView.js
55 7 0
renderEmptySessionsList()
in js/tabs/schedule/MyScheduleView.js
54 9 2
icon: require()
in js/tabs/schedule/GeneralScheduleView.js
51 4 1
render()
in js/tabs/schedule/FriendsScheduleView.js
48 1 0
render()
in js/common/F8Header.js
48 4 0
renderQuestionByType()
in js/rating/RatingQuestion.js
47 6 1
render()
in js/login/LoginScreen.js
46 1 0
render()
in js/tabs/maps/F8MapView.js
44 4 0
filterSessions()
in js/tabs/schedule/F8ScheduleGantt.js
44 18 1
icon: require()
in js/tabs/schedule/SessionsCarousel.js
44 2 1
render()
in js/common/F8Button.js
44 5 0
function sendSurveys()
in server/parse-server/cloud/functions/surveys.js
43 2 3
constructor()
in js/tabs/schedule/SessionsCarousel.js
40 4 1
render()
in js/common/MapView.js
40 2 0
render()
in js/tabs/schedule/F8ScheduleGantt.js
37 5 0