firebase / snippets-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 183 units with 1,560 lines of code in units (25.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 4 simple units (124 lines of code)
    • 179 very simple units (1,436 lines of code)
0% | 0% | 0% | 7% | 92%
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% | 0% | 0% | 8% | 91%
m0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ml-functions0% | 0% | 0% | 35% | 64%
storage0% | 0% | 0% | 11% | 88%
firestore0% | 0% | 0% | 11% | 88%
mlkit0% | 0% | 0% | 14% | 85%
firoptions0% | 0% | 0% | 0% | 100%
dl-invites-sample0% | 0% | 0% | 0% | 100%
database0% | 0% | 0% | 0% | 100%
invites0% | 0% | 0% | 0% | 100%
appcheck0% | 0% | 0% | 0% | 100%
installations0% | 0% | 0% | 0% | 100%
crashlytics0% | 0% | 0% | 0% | 100%
inappmessaging0% | 0% | 0% | 0% | 100%
functions0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func imageOrientation()
in mlkit/swift-snippets/ImagePreparation.swift
17 10 2
func fetchRemoteBundle()
in firestore/swift/firestore-smoketest/SolutionBundles.swift
32 6 3
func storageUploadCombinedExample()
in storage/StorageReferenceSwift/ViewController.swift
33 6 0
func getRecognizedTextsFrom()
in ml-functions/MLFunctionsExampleSwift/ViewController.swift
42 6 1
func storageDownloadCombinedExample()
in storage/StorageReferenceSwift/ViewController.swift
36 5 0
func loadQuery()
in firestore/swift/firestore-smoketest/SolutionBundles.swift
24 4 4
func listAllFiles()
in storage/StorageReferenceSwift/ViewController.swift
12 4 0
func getRecognizedLandmarksFrom()
in ml-functions/MLFunctionsExampleSwift/ViewController.swift
15 4 1
func application()
in invites/InvitesExampleSwift/AppDelegate.swift
15 4 4
func loadCached()
in database/DatabaseReference/swift/ViewController.swift
34 4 0
func getDocumentsCompletion()
in firestore/swift/firestore-smoketest/SolutionGeoPointViewController.swift
16 3 2
func getCount()
in firestore/swift/firestore-smoketest/SolutionCountersViewController.swift
13 3 1
func runStoriesQuery()
in firestore/swift/firestore-smoketest/SolutionBundles.swift
16 3 0
func annotateImage()
in ml-functions/MLFunctionsExampleSwift/ViewController.swift
11 3 1
func getLabeledObjectsFrom()
in ml-functions/MLFunctionsExampleSwift/ViewController.swift
9 3 1
func sign()
in invites/InvitesExampleSwift/ViewController.swift
12 3 3
func application()
in invites/InvitesExampleSwift/AppDelegate.swift
11 3 3
func geoQuery()
in firestore/swift/firestore-smoketest/SolutionGeoPointViewController.swift
16 2 0
func addRatingTransaction()
in firestore/swift/firestore-smoketest/SolutionAggregationViewController.swift
21 2 2
func createCounter()
in firestore/swift/firestore-smoketest/SolutionCountersViewController.swift
7 2 2