dart-lang / sample-pop_pop_win
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 60 units with 712 lines of code in units (45.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (85 lines of code)
    • 1 simple units (31 lines of code)
    • 57 very simple units (596 lines of code)
0% | 0% | 11% | 4% | 83%
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
dart0% | 0% | 11% | 4% | 83%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/src/game0% | 0% | 28% | 0% | 71%
lib/src/stage0% | 0% | 15% | 13% | 70%
lib/src0% | 0% | 0% | 0% | 100%
lib0% | 0% | 0% | 0% | 100%
web0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
String toBoardString()
in lib/src/game/game_core.dart
48 14 0
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 _processUrlHash()
in lib/src/platform_web.dart
21 5 0
void _startPopAnimation()
in lib/src/stage/game_element.dart
41 5 2
List getAdjacentIndices()
in lib/src/array_2d.dart
11 5 2
void updateClock()
in lib/src/game_manager.dart
8 5 0
bool _canChord()
in lib/src/game/game_core.dart
16 5 2
void toggleAbout()
in lib/src/platform_web.dart
11 4 1
void _animationDelay()
in lib/src/stage/game_element.dart
16 4 3
void onGameStateChanged()
in lib/src/stage/game_root.dart
21 4 1
int? getAdjacentCount()
in lib/src/game/field.dart
14 4 2
void _setState()
in lib/src/game/game_core.dart
16 4 1
bool _toggleFlag()
in lib/src/stage/game_element.dart
17 3 2
String _textValue()
in lib/src/stage/score_element.dart
11 3 0
void _onClick()
in lib/src/stage/square_element.dart
6 3 1
bool updateBestTime()
in lib/src/game_storage.dart
16 3 1
int _getIndex()
in lib/src/array_2d.dart
5 3 2
void _playAudio()
in lib/src/audio.dart
13 3 1
factory Field()
in lib/src/game/field.dart
14 3 4