firebase / quickstart-android
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 676 units with 6,058 lines of code in units (55.9% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (181 lines of code)
    • 59 medium size units (1,790 lines of code)
    • 104 small units (1,541 lines of code)
    • 510 very small units (2,546 lines of code)
0% | 2% | 29% | 25% | 42%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java0% | 4% | 36% | 21% | 37%
kt0% | 0% | 16% | 33% | 50%
py0% | 0% | 0% | 50% | 49%
js0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
auth0% | 3% | 37% | 23% | 35%
messaging0% | 29% | 35% | 20% | 15%
database0% | 5% | 27% | 21% | 45%
firestore0% | 0% | 19% | 23% | 56%
storage0% | 0% | 22% | 32% | 45%
perf0% | 0% | 53% | 32% | 13%
dynamiclinks0% | 0% | 56% | 29% | 14%
inappmessaging0% | 0% | 45% | 54% | 0%
analytics0% | 0% | 10% | 33% | 56%
scripts0% | 0% | 0% | 50% | 49%
internal0% | 0% | 0% | 25% | 75%
functions0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public void onViewCreated()
in auth/app/src/main/java/com/google/firebase/quickstart/auth/java/PhoneAuthFragment.java
71 7 2
protected void onCreate()
in messaging/app/src/main/java/com/google/firebase/quickstart/fcm/java/MainActivity.java
56 6 1
public CommentAdapter()
in database/app/src/main/java/com/google/firebase/quickstart/database/java/PostDetailFragment.java
54 3 2
private void onClickVerifyPhoneNumber()
in auth/app/src/main/java/com/google/firebase/quickstart/auth/java/MultiFactorEnrollFragment.java
50 2 0
public void onViewCreated()
in auth/app/src/main/java/com/google/firebase/quickstart/auth/java/MultiFactorFragment.java
50 3 2
private void updateUI()
in auth/app/src/main/java/com/google/firebase/quickstart/auth/java/PhoneAuthFragment.java
49 10 3
protected void onCreate()
in perf/app/src/main/java/com/google/firebase/quickstart/perfmon/java/MainActivity.java
49 3 1
public void onActivityCreated()
in database/app/src/main/java/com/google/firebase/quickstart/database/java/listfragments/PostListFragment.java
48 2 1
public void onViewCreated()
in auth/app/src/main/java/com/google/firebase/quickstart/auth/java/MultiFactorUnenrollFragment.java
47 4 2
private void uploadFromUri()
in storage/app/src/main/java/com/google/firebase/quickstart/firebasestorage/java/MyUploadService.java
45 2 1
public void onViewCreated()
in auth/app/src/main/java/com/google/firebase/quickstart/auth/java/MultiFactorSignInFragment.java
43 4 2
override fun onCreate()
in messaging/app/src/main/java/com/google/firebase/quickstart/fcm/kotlin/MainActivity.kt
43 5 1
private void downloadFromPath()
in storage/app/src/main/java/com/google/firebase/quickstart/firebasestorage/java/MyDownloadService.java
40 2 1
protected void onCreate()
in dynamiclinks/app/src/main/java/com/google/firebase/quickstart/deeplinks/java/MainActivity.java
40 3 1
protected void onCreate()
in storage/app/src/main/java/com/google/firebase/quickstart/firebasestorage/java/MainActivity.java
39 6 1
public void onViewCreated()
in auth/app/src/main/java/com/google/firebase/quickstart/auth/java/EmailPasswordFragment.java
39 1 2
private void updateUI()
in auth/app/src/main/java/com/google/firebase/quickstart/auth/java/MultiFactorFragment.java
38 6 1
private void submitPost()
in database/app/src/main/java/com/google/firebase/quickstart/database/java/NewPostFragment.java
38 4 0
override fun onViewCreated()
in auth/app/src/main/java/com/google/firebase/quickstart/auth/kotlin/MultiFactorUnenrollFragment.kt
37 4 2
override fun onCreate()
in perf/app/src/main/java/com/google/firebase/quickstart/perfmon/kotlin/MainActivity.kt
37 3 1