firebase / firebase-cpp-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 5,564 units with 51,195 lines of code in units (50.5% of code).
    • 1 very complex units (163 lines of code)
    • 12 complex units (1,075 lines of code)
    • 105 medium complex units (5,478 lines of code)
    • 237 simple units (6,867 lines of code)
    • 5,209 very simple units (37,612 lines of code)
<1% | 2% | 10% | 13% | 73%
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
cpp41% | 18% | 0% | 9% | 30%
cc0% | 2% | 10% | 14% | 72%
py0% | 3% | 34% | 21% | 40%
mm0% | 0% | 5% | 13% | 80%
java0% | 0% | 6% | 3% | 89%
rb0% | 0% | 0% | 48% | 51%
swift0% | 0% | 0% | 47% | 53%
h0% | 0% | 0% | 1% | 98%
kt0% | 0% | 0% | 0% | 100%
m0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
admob5% | 2% | 8% | 1% | 82%
app0% | 7% | 10% | 17% | 64%
scripts0% | 3% | 35% | 22% | 38%
database0% | 1% | 13% | 14% | 70%
remote_config0% | 1% | 1% | 15% | 81%
firestore0% | 0% | 4% | 6% | 88%
storage0% | 0% | 8% | 19% | 71%
auth0% | 0% | 3% | 10% | 85%
functions0% | 0% | 34% | 11% | 53%
dynamic_links0% | 0% | 15% | 14% | 69%
messaging0% | 0% | 4% | 13% | 82%
testing0% | 0% | 5% | 5% | 88%
ROOT0% | 0% | 12% | 21% | 65%
analytics0% | 0% | 5% | 24% | 70%
performance0% | 0% | 0% | 3% | 96%
testlab0% | 0% | 0% | 5% | 94%
installations0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void GameEngine::onTap()
in admob/tools/ios/testapp/testapp/game_engine.cpp
163 60 2
bool Initialize()
in app/src/util_android.cc
82 46 2
def main()
in scripts/merge_libraries.py
122 45 1
int ZLib::UncompressAtMostOrAll()
in app/rest/zlibwrapper.cc
125 40 5
void Variant::Clear()
in app/src/variant.cc
125 37 1
129 32 3
void CurlThread::ProcessRequests()
in app/rest/transport_curl.cc
169 30 0
Variant FlexbufferToVariant()
in remote_config/src/desktop/remote_config_response.cc
43 29 1
def combine_config()
in scripts/gha/summarize_test_results.py
29 29 4
Variant FlexbufferToVariant()
in app/src/variant_util.cc
43 29 1
Variant FlexbufferToVariant()
in database/src/desktop/persistence/flatbuffer_conversions.cc
43 29 1
int QueryParamsComparator::CompareValues()
in database/src/desktop/query_params_comparator.cc
94 28 2
void GameEngine::onUpdate()
in admob/tools/ios/testapp/testapp/game_engine.cpp
71 26 0
def main()
in scripts/gha/build_testapps.py
72 25 1
void StorageReferenceInternal::FutureCallback()
in storage/src/android/storage_reference_android.cc
101 24 5
bool Base64Decode()
in app/src/base64.cc
49 24 2
def build_xcframeworks()
in scripts/gha/build_ios_tvos.py
82 23 4
def main()
in scripts/gha/install_prereqs_desktop.py
29 22 0
std::vector SyncTree::RemoveEventRegistration()
in database/src/desktop/core/sync_tree.cc
64 22 3
ParseUrl::ParseResult ParseUrl::Parse()
in database/src/desktop/util_desktop.cc
65 22 1