dart-lang / mime
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 19 units with 308 lines of code in units (20.0% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (181 lines of code)
    • 0 medium complex units (0 lines of code)
    • 3 simple units (47 lines of code)
    • 15 very simple units (80 lines of code)
0% | 58% | 0% | 15% | 25%
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% | 58% | 0% | 15% | 25%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/src0% | 59% | 0% | 15% | 24%
example0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 19 most complex units
Unit# linesMcCabe index# params
void _parse()
in lib/src/bound_multipart_stream.dart
181 47 0
String? lookup()
in lib/src/mime_type.dart
19 8 2
void _tryPropagateControllerState()
in lib/src/bound_multipart_stream.dart
17 7 0
bool matches()
in lib/src/magic_number.dart
11 6 1
void addMagicNumber()
in lib/src/mime_type.dart
9 4 3
int _toLowerCase()
in lib/src/bound_multipart_stream.dart
6 3 1
void _expectWhitespace()
in lib/src/bound_multipart_stream.dart
5 3 1
String extensionFromMime()
in lib/src/mime_type.dart
9 3 1
static String? _matchMagic()
in lib/src/mime_type.dart
7 3 2
void _expectByteValue()
in lib/src/bound_multipart_stream.dart
5 2 2
static String _ext()
in lib/src/mime_type.dart
5 2 1
void Function()
in lib/src/bound_multipart_stream.dart
5 1 1
void _resumeStream()
in lib/src/bound_multipart_stream.dart
5 1 0
void _pauseStream()
in lib/src/bound_multipart_stream.dart
4 1 0
Uint8List _getBoundary()
in lib/src/mime_multipart_transformer.dart
10 1 1
String? lookupMimeType()
in lib/src/mime_type.dart
1 1 2
void addExtension()
in lib/src/mime_type.dart
3 1 2
const MagicNumber()
in lib/src/magic_number.dart
1 1 3
void main()
in example/example.dart
5 1 0