dart-lang / sample-pop_pop_win
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 60 units with 712 lines of code in units (45.7% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 8 medium size units (264 lines of code)
    • 18 small units (262 lines of code)
    • 34 very small units (186 lines of code)
0% | 0% | 37% | 36% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
dart0% | 0% | 37% | 36% | 26%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/src/stage0% | 0% | 67% | 23% | 9%
lib/src/game0% | 0% | 28% | 43% | 28%
lib0% | 0% | 39% | 51% | 9%
lib/src0% | 0% | 10% | 35% | 53%
web0% | 0% | 0% | 78% | 21%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
String toBoardString()
in lib/src/game/game_core.dart
48 14 0
void _startPopAnimation()
in lib/src/stage/game_element.dart
41 5 2
Future _initialLoad()
in lib/pop_pop_win.dart
38 1 2
void click()
in lib/src/stage/game_element.dart
37 11 3
void updateState()
in lib/src/stage/square_element.dart
31 8 0
void _startDartAnimation()
in lib/src/stage/game_element.dart
27 2 1
void _processUrlHash()
in lib/src/platform_web.dart
21 5 0
void onGameStateChanged()
in lib/src/stage/game_root.dart
21 4 1
void _secondaryLoad()
in lib/pop_pop_win.dart
20 1 3
void sendTiming()
in lib/src/analytics.dart
18 1 5
Future startGame()
in lib/pop_pop_win.dart
18 1 0
bool _toggleFlag()
in lib/src/stage/game_element.dart
17 3 2
void _animationDelay()
in lib/src/stage/game_element.dart
16 4 3
bool updateBestTime()
in lib/src/game_storage.dart
16 3 1
bool _canChord()
in lib/src/game/game_core.dart
16 5 2
void _setState()
in lib/src/game/game_core.dart
16 4 1
15 3 0
factory Field()
in lib/src/game/field.dart
14 3 4
int? getAdjacentCount()
in lib/src/game/field.dart
14 4 2
void setFlag()
in lib/src/game/game_core.dart
14 2 3