firebase / codelab-friendlychat-ios
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 59 units with 493 lines of code in units (26.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (141 lines of code)
    • 6 small units (101 lines of code)
    • 49 very small units (251 lines of code)
0% | 0% | 28% | 20% | 50%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
swift0% | 0% | 29% | 21% | 49%
m0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
grow-ios-starter/swift-starter/FriendlyChatSwift0% | 0% | 43% | 9% | 47%
ios/swift/FriendlyChatSwift0% | 0% | 30% | 29% | 39%
ios-starter/swift-starter/FriendlyChatSwift0% | 0% | 0% | 22% | 77%
grow-ios-starter/objc-starter/FriendlyChatObjC0% | 0% | 0% | 0% | 100%
ios-starter/objc-starter/FriendlyChatObjC0% | 0% | 0% | 0% | 100%
ios/objc/FriendlyChatObjC0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func imagePickerController()
in grow-ios-starter/swift-starter/FriendlyChatSwift/FCViewController.swift
39 4 2
func imagePickerController()
in ios/swift/FriendlyChatSwift/FCViewController.swift
38 4 2
func tableView()
in grow-ios-starter/swift-starter/FriendlyChatSwift/FCViewController.swift
32 6 2
func tableView()
in ios/swift/FriendlyChatSwift/FCViewController.swift
32 6 2
func imagePickerController()
in ios-starter/swift-starter/FriendlyChatSwift/FCViewController.swift
19 2 2
func application()
in ios/swift/FriendlyChatSwift/AppDelegate.swift
18 2 2
func fetchConfig()
in ios/swift/FriendlyChatSwift/FCViewController.swift
18 4 0
func showAlert()
in ios/swift/FriendlyChatSwift/AppDelegate.swift
16 3 1
func sign()
in grow-ios-starter/swift-starter/FriendlyChatSwift/AppDelegate.swift
15 3 3
func sign()
in ios/swift/FriendlyChatSwift/AppDelegate.swift
15 3 3
func application()
in grow-ios-starter/swift-starter/FriendlyChatSwift/AppDelegate.swift
10 2 3
func sendMessage()
in grow-ios-starter/swift-starter/FriendlyChatSwift/FCViewController.swift
9 2 1
func showAlert()
in grow-ios-starter/swift-starter/FriendlyChatSwift/FCViewController.swift
9 1 2
func showAlert()
in ios-starter/swift-starter/FriendlyChatSwift/FCViewController.swift
9 1 2
func showAlert()
in ios/swift/FriendlyChatSwift/FCViewController.swift
9 1 2
func configureDatabase()
in grow-ios-starter/swift-starter/FriendlyChatSwift/FCViewController.swift
8 1 0
func textFieldShouldReturn()
in grow-ios-starter/swift-starter/FriendlyChatSwift/FCViewController.swift
8 1 1
func textFieldShouldReturn()
in ios-starter/swift-starter/FriendlyChatSwift/FCViewController.swift
8 1 1
func configureDatabase()
in ios/swift/FriendlyChatSwift/FCViewController.swift
8 1 0
func textFieldShouldReturn()
in ios/swift/FriendlyChatSwift/FCViewController.swift
8 1 1