firebase / quickstart-ios
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 333 units with 3,216 lines of code in units (19.2% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (195 lines of code)
    • 3 medium complex units (83 lines of code)
    • 10 simple units (344 lines of code)
    • 319 very simple units (2,594 lines of code)
0% | 6% | 2% | 10% | 80%
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
swift0% | 6% | 2% | 11% | 80%
m0% | 0% | 0% | 0% | 100%
rb0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
authentication0% | 19% | 8% | 10% | 60%
firestore0% | 0% | 0% | 34% | 65%
storage0% | 0% | 0% | 60% | 40%
functions0% | 0% | 0% | 14% | 85%
database0% | 0% | 0% | 0% | 100%
performance0% | 0% | 0% | 0% | 100%
abtesting0% | 0% | 0% | 0% | 100%
crashlytics0% | 0% | 0% | 0% | 100%
analytics0% | 0% | 0% | 0% | 100%
dynamiclinks0% | 0% | 0% | 0% | 100%
config0% | 0% | 0% | 0% | 100%
messaging0% | 0% | 0% | 0% | 100%
admob0% | 0% | 0% | 0% | 100%
appdistribution0% | 0% | 0% | 0% | 100%
inappmessaging0% | 0% | 0% | 0% | 100%
installations0% | 0% | 0% | 0% | 100%
template0% | 0% | 0% | 0% | 100%
scripts0% | 0% | 0% | 0% | 100%
swiftui0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func showAuthPicker()
in authentication/LegacyAuthQuickstart/AuthenticationExampleSwift/MainViewController.swift
195 34 1
init?()
in authentication/AuthenticationExample/Models/AuthProvider.swift
29 13 1
func didSelectRowAt()
in authentication/AuthenticationExample/ViewControllers/AuthViewController.swift
27 11 2
func didSelectRowAt()
in authentication/AuthenticationExample/ViewControllers/UserViewController.swift
27 11 2
func firebaseLogin()
in authentication/LegacyAuthQuickstart/AuthenticationExampleSwift/MainViewController.swift
78 10 1
func didSelectRowAt()
in authentication/AuthenticationExample/ViewControllers/AccountLinkingViewController.swift
29 9 2
func populate()
in firestore/FirestoreSwiftUIExample/Extensions/Firestore+Extension.swift
55 6 0
func pickerView()
in firestore/FirestoreExample/FiltersViewController.swift
14 6 2
func pickerView()
in firestore/FirestoreExample/FiltersViewController.swift
14 6 3
func pickerView()
in firestore/FirestoreExample/FiltersViewController.swift
14 6 3
func query()
in firestore/FirestoreExample/RestaurantsTableViewController.swift
23 6 4
func reviewController()
in firestore/FirestoreExample/RestaurantDetailViewController.swift
54 6 2
func imagePickerController()
in storage/StorageExampleSwift/ViewController.swift
48 6 2
func authUI()
in functions/LegacyFunctionsQuickstart/FunctionsExampleSwift/SignInViewController.swift
15 6 3
func getFilterText()
in firestore/FirestoreSwiftUIExample/Views/RestaurantListView.swift
17 5 0
func query()
in firestore/FirestoreSwiftUIExample/ViewModels/RestaurantListViewModel.swift
16 5 4
func priceString()
in firestore/FirestoreExample/RestaurantsTableViewController.swift
14 5 1
func getNetworkStatus()
in crashlytics/LegacyCrashlyticsQuickstart/CrashlyticsExampleSwift/ViewController.swift
15 5 0
func getNetworkStatus()
in crashlytics/Shared/ReachabililtyHelper.swift
15 5 0
func add()
in firestore/FirestoreSwiftUIExample/ViewModels/RestaurantViewModel.swift
37 4 1