firebase / firebase-ios-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 6,319 units with 54,012 lines of code in units (24.4% of code).
    • 2 very complex units (245 lines of code)
    • 14 complex units (1,182 lines of code)
    • 78 medium complex units (4,113 lines of code)
    • 284 simple units (8,302 lines of code)
    • 5,941 very simple units (40,170 lines of code)
<1% | 2% | 7% | 15% | 74%
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
cc<1% | <1% | 6% | 16% | 75%
c2% | 15% | 9% | 28% | 43%
py0% | 8% | 18% | 22% | 50%
swift0% | 0% | 18% | 17% | 63%
m0% | 0% | 6% | 24% | 68%
rb0% | 0% | 6% | 5% | 87%
h0% | 0% | <1% | <1% | 99%
mm0% | 0% | 0% | 22% | 77%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Firestore<1% | <1% | 4% | 12% | 82%
Crashlytics1% | 8% | 7% | 30% | 51%
scripts0% | 8% | 22% | 21% | 47%
FirebaseMLModelDownloader0% | 0% | 32% | 29% | 38%
ReleaseTooling0% | 0% | 36% | 16% | 46%
FirebaseMessaging0% | 0% | 9% | 15% | 75%
Firebase0% | 0% | 17% | 31% | 50%
FirebaseFunctions0% | 0% | 60% | 0% | 39%
FirebasePerformance0% | 0% | 0% | 5% | 94%
FirebaseDynamicLinks0% | 0% | 0% | 22% | 77%
FirebaseInAppMessaging0% | 0% | 0% | 14% | 85%
FirebaseDatabase0% | 0% | 0% | 47% | 52%
FirebaseCore0% | 0% | 0% | 32% | 67%
FirebaseRemoteConfig0% | 0% | 0% | 19% | 80%
FirebaseCombineSwift0% | 0% | 0% | 0% | 100%
FirebaseAuth0% | 0% | 0% | 0% | 100%
FirebaseAppCheck0% | 0% | 0% | 0% | 100%
Example0% | 0% | 0% | 0% | 100%
FirebaseStorageSwift0% | 0% | 0% | 0% | 100%
SwiftPMTests0% | 0% | 0% | 0% | 100%
FirebaseStorage0% | 0% | 0% | 0% | 100%
FirebaseInstallations0% | 0% | 0% | 0% | 100%
FirebaseAppDistribution0% | 0% | 0% | 0% | 100%
FirebaseRemoteConfigSwift0% | 0% | 0% | 0% | 100%
FirebaseDatabaseSwift0% | 0% | 0% | 0% | 100%
FirebaseAnalyticsSwift0% | 0% | 0% | 0% | 100%
FirebaseABTesting0% | 0% | 0% | 0% | 100%
SharedTestUtilities0% | 0% | 0% | 0% | 100%
SymbolCollisionTest0% | 0% | 0% | 0% | 100%
CocoapodsIntegrationTest0% | 0% | 0% | 0% | 100%
FirebaseFunctionsSwift0% | 0% | 0% | 0% | 100%
GoogleUtilitiesComponents0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
static Error CodeForErrno()
in Firestore/core/src/util/status_errno.cc
140 85 1
bool FIRCLSDwarfExpressionMachineExecuteNextOpcode()
in Crashlytics/Crashlytics/Unwind/Dwarf/FIRCLSDwarfExpressionMachine.c
105 74 1
def CheckLanguage()
in scripts/cpplint.py
91 45 7
def Update()
in scripts/cpplint.py
88 40 5
def CheckBraces()
in scripts/cpplint.py
68 38 4
ViewDocumentChanges View::ComputeDocumentChanges()
in Firestore/core/src/core/view.cc
106 37 2
static void FIRCLSMachExceptionNameLookup()
in Crashlytics/Crashlytics/Handlers/FIRCLSMachException.c
124 36 4
std::string Reader::Describe()
in Firestore/core/src/local/leveldb_key.cc
101 35 0
def CheckSpacing()
in scripts/cpplint.py
51 33 5
bool FIRCLSDwarfInstructionsEnumerate()
in Crashlytics/Crashlytics/Unwind/Dwarf/FIRCLSDwarfUnwind.c
82 33 4
uintptr_t FIRCLSDwarfUnwindGetRegisterValue()
in Crashlytics/Crashlytics/Unwind/FIRCLSUnwind_arm.c
72 33 2
bool FIRCLSDwarfUnwindSetRegisterValue()
in Crashlytics/Crashlytics/Unwind/FIRCLSUnwind_arm.c
107 33 3
def CheckEmptyBlockBody()
in scripts/cpplint.py
54 27 4
def ParseArguments()
in scripts/cpplint.py
84 27 1
uintptr_t FIRCLSDwarfUnwindGetRegisterValue()
in Crashlytics/Crashlytics/Unwind/FIRCLSUnwind_x86.c
63 27 2
bool FIRCLSDwarfUnwindSetRegisterValue()
in Crashlytics/Crashlytics/Unwind/FIRCLSUnwind_x86.c
91 27 3
def CheckBracesSpacing()
in scripts/cpplint.py
32 25 5
static Error CodeForLastError()
in Firestore/core/src/util/status_win.cc
38 25 1
def CheckTrailingSemicolon()
in scripts/cpplint.py
42 24 4
BOOL FIRMessagingIsProductionApp()
in FirebaseMessaging/Sources/FIRMessagingUtilities.m
97 24 1