firebase / firebase-unity-sdk
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 2,281 units with 24,240 lines of code in units (38.7% of code).
    • 8 very long units (1,077 lines of code)
    • 31 long units (2,114 lines of code)
    • 236 medium size units (7,076 lines of code)
    • 403 small units (5,860 lines of code)
    • 1,603 very small units (8,113 lines of code)
4% | 8% | 29% | 24% | 33%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs5% | 8% | 29% | 23% | 32%
py0% | 14% | 31% | 23% | 30%
cpp0% | 0% | 100% | 0% | 0%
cc0% | 0% | 9% | 45% | 45%
swift0% | 0% | 47% | 15% | 38%
h0% | 0% | 0% | 12% | 87%
java0% | 0% | 0% | 74% | 25%
m0% | 0% | 0% | 46% | 53%
kt0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
firestore10% | 9% | 22% | 20% | 36%
auth13% | 4% | 19% | 41% | 20%
database4% | 6% | 49% | 13% | 26%
scripts0% | 10% | 30% | 24% | 34%
editor0% | 9% | 32% | 29% | 28%
storage0% | 9% | 30% | 25% | 34%
ROOT0% | 19% | 31% | 25% | 23%
messaging0% | 17% | 34% | 11% | 36%
installations0% | 18% | 28% | 21% | 30%
dynamic_links0% | 13% | 32% | 18% | 35%
app0% | 0% | 27% | 25% | 47%
functions0% | 0% | 40% | 27% | 32%
crashlytics0% | 0% | 16% | 40% | 42%
analytics0% | 0% | 32% | 27% | 40%
remote_config0% | 0% | 17% | 45% | 36%
testapp0% | 0% | 25% | 0% | 74%
aar_builder0% | 0% | 100% | 0% | 0%
cmake0% | 0% | 0% | 64% | 35%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private static List BundleTemplate()
in firestore/testapp/Assets/Firebase/Sample/Firestore/BundleBuilder.cs
159 1 0
Task TestAssertTaskFaults()
in firestore/testapp/Assets/Firebase/Sample/Firestore/UIHandlerAutomated.cs
153 20 0
void GUIDisplayControls()
in auth/testapp/Assets/Firebase/Sample/Auth/UIHandler.cs
151 31 0
Task TestTransactionDispose()
in firestore/testapp/Assets/Firebase/Sample/Firestore/UIHandlerAutomated.cs
148 1 0
public static IEnumerable TestData()
in firestore/testapp/Assets/Firebase/Sample/Firestore/SerializationTestData.cs
128 1 1
Task TestQueries()
in firestore/testapp/Assets/Firebase/Sample/Firestore/UIHandlerAutomated.cs
115 1 0
Task TestFirestoreSettings()
in firestore/testapp/Assets/Firebase/Sample/Firestore/UIHandlerAutomated.cs
113 1 0
Task TestOnDisconnect()
in database/testapp/Assets/Firebase/Sample/Database/UIHandlerAutomated.cs
110 2 0
void GUIDisplayControls()
in storage/testapp/Assets/Firebase/Sample/Storage/UIHandler.cs
99 21 0
private IEnumerator PerformTransaction()
in firestore/testapp/Assets/Firebase/Sample/Firestore/UIHandler.cs
98 16 0
protected override void Start()
in firestore/testapp/Assets/Firebase/Sample/Firestore/UIHandlerAutomated.cs
90 3 0
Task TestTerminate()
in firestore/testapp/Assets/Firebase/Sample/Firestore/UIHandlerAutomated.cs
90 1 0
Task TestFirestoreDispose()
in firestore/testapp/Assets/Firebase/Sample/Firestore/UIHandlerAutomated.cs
89 1 0
def main()
in scripts/gha/build_testapps.py
89 7 1
private IEnumerator PerformBatchWrite()
in firestore/testapp/Assets/Firebase/Sample/Firestore/UIHandler.cs
84 12 0
internal static void ReadAndApplyFirebaseConfig()
in editor/app/src/XcodeProjectPatcher.cs
73 14 2
IEnumerator DeliverMessageCoroutine()
in messaging/testapp/Assets/Firebase/Sample/Messaging/UIHandlerAutomated.cs
72 15 2
Task TestLimitToLast()
in firestore/testapp/Assets/Firebase/Sample/Firestore/UIHandlerAutomated.cs
71 1 0
private void OnGUI()
in editor/app/src/eap/ConfigWindow.cs
71 14 0
protected override void Start()
in storage/testapp/Assets/Firebase/Sample/Storage/UIHandlerAutomated.cs
69 3 0