flutter / packages
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 1,003 units with 16,546 lines of code in units (62.8% of code).
    • 1 very complex units (1,316 lines of code)
    • 3 complex units (433 lines of code)
    • 25 medium complex units (1,920 lines of code)
    • 72 simple units (2,661 lines of code)
    • 902 very simple units (10,216 lines of code)
7% | 2% | 11% | 16% | 61%
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
dart8% | 2% | 12% | 17% | 57%
cpp0% | 0% | 0% | 0% | 100%
cc0% | 0% | 0% | 0% | 100%
m0% | 0% | 0% | 0% | 100%
kt0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
packages/rfw27% | 2% | 8% | 12% | 50%
packages/web_benchmarks0% | 17% | 0% | 20% | 61%
packages/flutter_markdown0% | 9% | 12% | 10% | 67%
packages/pigeon0% | 0% | 26% | 18% | 54%
packages/multicast_dns0% | 0% | 32% | 14% | 53%
packages/palette_generator0% | 0% | 7% | 23% | 69%
packages/animations0% | 0% | 0% | 15% | 84%
packages/fuchsia_ctl0% | 0% | 0% | 25% | 74%
packages/flutter_image0% | 0% | 0% | 54% | 45%
packages/metrics_center0% | 0% | 0% | 38% | 61%
packages/pointer_interceptor0% | 0% | 0% | 0% | 100%
packages/imitation_game0% | 0% | 0% | 0% | 100%
packages/extension_google_sign_in_as_googleapis_auth0% | 0% | 0% | 0% | 100%
packages/cross_file0% | 0% | 0% | 0% | 100%
packages/xdg_directories0% | 0% | 0% | 0% | 100%
packages/flutter_lints0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
Iterable _tokenize()
in packages/rfw/lib/src/dart/text.dart
1316 778 1
static Curve curve()
in packages/rfw/lib/src/flutter/argument_decoders.dart
97 45 3
void visitElementAfter()
in packages/flutter_markdown/lib/src/builder.dart
138 31 1
Future run()
in packages/web_benchmarks/lib/src/runner.dart
198 29 0
List _validateAst()
in packages/pigeon/lib/pigeon_lib.dart
91 25 2
void generateJava()
in packages/pigeon/lib/java_generator.dart
219 25 3
void generateDart()
in packages/pigeon/lib/dart_generator.dart
160 23 3
static Object _resolveFrom()
in packages/rfw/lib/src/flutter/runtime.dart
80 21 4
Object _readValue()
in packages/rfw/lib/src/dart/text.dart
74 20 2
List? decodeMDnsResponse()
in packages/multicast_dns/lib/src/packet.dart
146 18 1
void _writeFlutterApi()
in packages/pigeon/lib/dart_generator.dart
122 17 5
void _writeHostApi()
in packages/pigeon/lib/java_generator.dart
134 17 2
bool visitElementBefore()
in packages/flutter_markdown/lib/src/builder.dart
64 17 1
void generateObjcSource()
in packages/pigeon/lib/objc_generator.dart
128 14 3
Map toMap()
in packages/pigeon/lib/pigeon_lib.dart
18 14 0
WrapAlignment _wrapAlignmentForBlockTag()
in packages/flutter_markdown/lib/src/builder.dart
33 14 1
static Object _bindLoopVariable()
in packages/rfw/lib/src/flutter/runtime.dart
67 14 3
static _ResolvedDynamicList _listLookup()
in packages/rfw/lib/src/flutter/runtime.dart
39 14 4
static Future run()
in packages/pigeon/lib/pigeon_lib.dart
55 12 3
List _mergeInlineChildren()
in packages/flutter_markdown/lib/src/builder.dart
49 12 2