firebase / quickstart-unity
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 245 units with 3,083 lines of code in units (13.9% of code).
    • 2 very long units (279 lines of code)
    • 1 long units (99 lines of code)
    • 35 medium size units (997 lines of code)
    • 64 small units (886 lines of code)
    • 143 very small units (822 lines of code)
9% | 3% | 32% | 28% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs9% | 3% | 32% | 28% | 26%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
auth21% | 0% | 20% | 43% | 15%
firestore24% | 0% | 17% | 18% | 40%
storage0% | 21% | 23% | 28% | 26%
messaging0% | 0% | 68% | 14% | 17%
database0% | 0% | 63% | 17% | 18%
functions0% | 0% | 43% | 33% | 23%
dynamic_links0% | 0% | 53% | 17% | 29%
crashlytics0% | 0% | 42% | 27% | 29%
remote_config0% | 0% | 34% | 44% | 20%
analytics0% | 0% | 35% | 24% | 40%
installations0% | 0% | 33% | 22% | 44%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
void GUIDisplayControls()
in auth/testapp/Assets/Firebase/Sample/Auth/UIHandler.cs
151 31 0
public static IEnumerable TestData()
in firestore/testapp/Assets/Firebase/Sample/Firestore/SerializationTestData.cs
128 1 1
void GUIDisplayControls()
in storage/testapp/Assets/Firebase/Sample/Storage/UIHandler.cs
99 21 0
void GUIDisplayControls()
in messaging/testapp/Assets/Firebase/Sample/Messaging/UIHandler.cs
49 7 0
void GUIDisplayControls()
in firestore/testapp/Assets/Firebase/Sample/Firestore/UIHandler.cs
41 7 0
DynamicLinkComponents CreateDynamicLinkComponents()
in dynamic_links/testapp/Assets/Firebase/Sample/DynamicLinks/UIHandler.cs
40 1 0
void OnGUI()
in storage/testapp/Assets/Firebase/Sample/Storage/UIHandler.cs
38 7 0
void GUIDisplayControls()
in crashlytics/testapp/Assets/Firebase/Sample/Crashlytics/UIHandler.cs
36 8 0
MetadataChange StringToMetadataChange()
in storage/testapp/Assets/Firebase/Sample/Storage/UIHandler.cs
34 11 1
protected string MetadataToString()
in storage/testapp/Assets/Firebase/Sample/Storage/UIHandler.cs
34 6 2
void OnGUI()
in functions/testapp/Assets/Firebase/Sample/Functions/UIHandler.cs
34 6 0
void FetchComplete()
in remote_config/testapp/Assets/Firebase/Sample/RemoteConfig/UIHandler.cs
32 9 1
public Task RunAsync()
in functions/testapp/Assets/Firebase/Sample/Functions/TestCase.cs
32 8 2
void GUIDisplayControls()
in analytics/testapp/Assets/Firebase/Sample/Analytics/UIHandler.cs
30 9 0
void GUIDisplayControls()
in database/testapp/Assets/Firebase/Sample/Database/UIHandler.cs
30 6 0
public static string DebugString()
in crashlytics/testapp/Assets/Firebase/Sample/Crashlytics/Utils.cs
29 7 2
public static string DebugString()
in functions/testapp/Assets/Firebase/Sample/Functions/Utils.cs
29 7 2
protected void StartListener()
in database/testapp/Assets/Firebase/Sample/Database/UIHandler.cs
29 7 0
private Task CreateAndDisplayShortLinkAsync()
in dynamic_links/testapp/Assets/Firebase/Sample/DynamicLinks/UIHandler.cs
28 6 1
TransactionResult AddScoreTransaction()
in database/testapp/Assets/Firebase/Sample/Database/UIHandler.cs
28 7 1