firebase / firebase-unity-sdk
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 2,281 units with 24,240 lines of code in units (38.7% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (160 lines of code)
    • 34 medium complex units (1,812 lines of code)
    • 111 simple units (3,075 lines of code)
    • 2,134 very simple units (19,193 lines of code)
0% | <1% | 7% | 12% | 79%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
cs0% | <1% | 5% | 11% | 82%
py0% | <1% | 21% | 25% | 52%
swift0% | 0% | 0% | 47% | 53%
cpp0% | 0% | 0% | 46% | 53%
cc0% | 0% | 0% | 3% | 96%
h0% | 0% | 0% | 0% | 100%
m0% | 0% | 0% | 0% | 100%
java0% | 0% | 0% | 0% | 100%
kt0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
auth0% | 13% | 0% | 16% | 70%
scripts0% | <1% | 13% | 24% | 61%
firestore0% | 0% | 5% | 5% | 88%
ROOT0% | 0% | 35% | 22% | 42%
editor0% | 0% | 10% | 15% | 74%
storage0% | 0% | 10% | 10% | 79%
database0% | 0% | 3% | 4% | 91%
messaging0% | 0% | 17% | 23% | 58%
app0% | 0% | 3% | 12% | 84%
functions0% | 0% | 0% | 33% | 66%
dynamic_links0% | 0% | 0% | 31% | 69%
crashlytics0% | 0% | 0% | 14% | 85%
installations0% | 0% | 0% | 25% | 74%
analytics0% | 0% | 0% | 25% | 74%
remote_config0% | 0% | 0% | 10% | 89%
aar_builder0% | 0% | 0% | 100% | 0%
testapp0% | 0% | 0% | 0% | 100%
cmake0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void GUIDisplayControls()
in auth/testapp/Assets/Firebase/Sample/Auth/UIHandler.cs
151 31 0
def combine_config()
in scripts/gha/summarize_test_results.py
9 27 3
void GUIDisplayControls()
in storage/testapp/Assets/Firebase/Sample/Storage/UIHandler.cs
99 21 0
Task TestAssertTaskFaults()
in firestore/testapp/Assets/Firebase/Sample/Firestore/UIHandlerAutomated.cs
153 20 0
def main()
in swig_nested_fix.py
60 20 1
public static FirestoreError Convert()
in firestore/src/internal/Enums.cs
41 18 1
def summarize_logs()
in scripts/gha/summarize_test_results.py
56 18 3
private static void UpdateJson()
in editor/app/src/GenerateXmlFromGoogleServicesJson.cs
64 18 3
public void Update()
in scripts/gha/integration_testing/automated_testapp/AutomatedTestRunner.cs
66 17 0
def __call__()
in swig_post_process.py
52 17 4
private IEnumerator PerformTransaction()
in firestore/testapp/Assets/Firebase/Sample/Firestore/UIHandler.cs
98 16 0
IEnumerator DeliverMessageCoroutine()
in messaging/testapp/Assets/Firebase/Sample/Messaging/UIHandlerAutomated.cs
72 15 2
private static bool EqualContent()
in database/testapp/Assets/Firebase/Sample/Database/UIHandlerAutomated.cs
39 15 2
internal static int ErrorToCode()
in database/src/DatabaseError.cs
19 15 1
def main()
in scripts/gha/trigger_workflow.py
44 14 0
def main()
in scripts/gha/print_matrix_configuration.py
34 14 0
def scan_input_file()
in swig_commenter.py
39 14 2
def process_output_file()
in swig_commenter.py
45 14 2
private void OnGUI()
in editor/app/src/eap/ConfigWindow.cs
71 14 0
internal static void ReadAndApplyFirebaseConfig()
in editor/app/src/XcodeProjectPatcher.cs
73 14 2