dart-lang / html
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 531 units with 6,163 lines of code in units (60.1% of code).
    • 2 very complex units (251 lines of code)
    • 1 complex units (46 lines of code)
    • 34 medium complex units (1,335 lines of code)
    • 48 simple units (1,096 lines of code)
    • 446 very simple units (3,435 lines of code)
4% | <1% | 21% | 17% | 55%
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
dart4% | <1% | 21% | 17% | 55%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib7% | 0% | 22% | 7% | 62%
lib/src0% | 1% | 20% | 30% | 46%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
Token? processStartTag()
in lib/parser.dart
170 104 1
Token? processEndTag()
in lib/parser.dart
81 56 1
bool _invalidUnicode()
in lib/src/html_input_stream.dart
46 46 1
void consumeEntity()
in lib/src/tokenizer.dart
79 25 2
bool isHexDigit()
in lib/src/constants.dart
29 24 1
List? _getAttribute()
in lib/src/encoding_parser.dart
64 24 0
void resetInsertionMode()
in lib/parser.dart
66 23 0
void endTagBody()
in lib/parser.dart
34 20 1
bool visitSelector()
in lib/src/query_selector.dart
43 18 1
String consumeNumberEntity()
in lib/src/tokenizer.dart
76 18 1
void endTagFormatting()
in lib/parser.dart
91 18 1
bool isVoidElement()
in lib/dom_parsing.dart
22 17 1
bool markupDeclarationOpenState()
in lib/src/tokenizer.dart
49 17 0
bool visitPseudoClassSelector()
in lib/src/query_selector.dart
25 16 1
bool afterDoctypeNameState()
in lib/src/tokenizer.dart
49 16 0
bool inForeignContent()
in lib/parser.dart
28 16 2
void mainLoop()
in lib/parser.dart
57 16 0
Token? processDoctype()
in lib/parser.dart
99 16 1
Token? processStartTag()
in lib/parser.dart
37 16 1
Token? processStartTag()
in lib/parser.dart
32 14 1