dart-lang / dart-pad
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 484 units with 4,799 lines of code in units (32.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 8 medium complex units (492 lines of code)
    • 18 simple units (509 lines of code)
    • 458 very simple units (3,798 lines of code)
0% | 0% | 10% | 10% | 79%
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% | 10% | 10% | 78%
js0% | 0% | 0% | 0% | 100%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib0% | 0% | 13% | 12% | 73%
lib/src0% | 0% | 13% | 0% | 86%
lib/editing0% | 0% | 32% | 11% | 55%
lib/sharing0% | 0% | 11% | 19% | 69%
lib/services0% | 0% | 0% | 41% | 58%
lib/core0% | 0% | 0% | 28% | 71%
lib/inject0% | 0% | 0% | 18% | 81%
lib/elements0% | 0% | 0% | 0% | 100%
web/example0% | 0% | 0% | 0% | 100%
web/scripts0% | 0% | 0% | 0% | 100%
lib/util0% | 0% | 0% | 0% | 100%
lib/workshops0% | 0% | 0% | 0% | 100%
web0% | 0% | 0% | 0% | 100%
tool0% | 0% | 0% | 0% | 100%
lib/modules0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
Future complete()
in lib/completion.dart
122 21 3
Future _loadAndShowGist()
in lib/embed.dart
72 15 1
void generateDoc()
in lib/documentation.dart
44 12 1
factory VersionResponse()
in lib/src/protos/dart_services.pb.dart
49 12 12
Future _completionHelper()
in lib/editing/editor_codemirror.dart
62 12 3
Future loadGistFromRepo()
in lib/sharing/gists.dart
60 11 5
factory AnalysisIssue()
in lib/src/protos/dart_services.pb.dart
45 11 11
Map? _parameterInfo()
in lib/parameter_popup.dart
38 11 2
String _dartApiLink()
in lib/documentation.dart
32 10 1
void _handleAutoCompletion()
in lib/playground.dart
18 10 1
void _init()
in lib/embed.dart
49 9 0
void _handleKeyEvent()
in lib/core/keys.dart
20 9 1
void _showGist()
in lib/playground.dart
39 9 1
String _decorateJavaScript()
in lib/services/execution_iframe.dart
74 9 4
void _lookupParameterInfo()
in lib/parameter_popup.dart
52 9 0
String printKeyEvent()
in lib/core/keys.dart
13 8 1
static void _defaultLoadHook()
in lib/sharing/gists.dart
21 8 1
24 7 0
void _readLine()
in lib/inject/inject_parser.dart
23 7 1
Future performAnalysis()
in lib/sharing/editor_ui.dart
42 7 0