flutter / samples
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,942 units with 23,137 lines of code in units (47.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 13 medium complex units (922 lines of code)
    • 20 simple units (1,001 lines of code)
    • 1,909 very simple units (21,214 lines of code)
0% | 0% | 3% | 4% | 91%
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% | 4% | 4% | 90%
java0% | 0% | 0% | 30% | 70%
kt0% | 0% | 0% | 4% | 95%
cpp0% | 0% | 0% | 0% | 100%
cc0% | 0% | 0% | 0% | 100%
swift0% | 0% | 0% | 0% | 100%
m0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
web0% | 0% | 5% | 5% | 89%
experimental0% | 0% | 9% | 7% | 83%
navigation_and_routing0% | 0% | 13% | 0% | 86%
veggieseasons0% | 0% | 2% | 0% | 97%
platform_design0% | 0% | 2% | 0% | 97%
form_app0% | 0% | 0% | 25% | 74%
add_to_app0% | 0% | 0% | 3% | 96%
isolate_example0% | 0% | 0% | 6% | 93%
place_tracker0% | 0% | 0% | 3% | 96%
animations0% | 0% | 0% | 0% | 100%
jsonexample0% | 0% | 0% | 0% | 100%
platform_channels0% | 0% | 0% | 0% | 100%
testing_app0% | 0% | 0% | 0% | 100%
provider_shopper0% | 0% | 0% | 0% | 100%
flutter_maps_firestore0% | 0% | 0% | 0% | 100%
infinite_list0% | 0% | 0% | 0% | 100%
null_safety0% | 0% | 0% | 0% | 100%
android_splash_screen0% | 0% | 0% | 0% | 100%
platform_view_swift0% | 0% | 0% | 0% | 100%
provider_counter0% | 0% | 0% | 0% | 100%
ios_app_clip0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
static Season? _getSeasonForDate()
in veggieseasons/lib/data/app_state.dart
33 19 1
Widget _buildLayout()
in experimental/desktop_photo_search/lib/src/widgets/split.dart
71 18 2
bool matchesQuery()
in web/samples_index/lib/src/search.dart
37 15 2
Widget build()
in experimental/linting_tool/lib/pages/saved_lints_page.dart
126 13 1
void buildPaths()
in web/github_dataviz/lib/layered_chart.dart
128 13 8
Widget build()
in experimental/linting_tool/lib/pages/rules_page.dart
140 12 1
Future executeInstruction()
in web/particle_background/lib/simple_animations_package.dart
30 12 0
Widget build()
in navigation_and_routing/lib/src/screens/navigator.dart
64 11 1
Future searchPhotos()
in experimental/desktop_photo_search/lib/src/unsplash/unsplash.dart
44 11 6
Widget build()
in web/navigation_and_routing/lib/src/screens/navigator.dart
64 11 1
void paint()
in web/github_dataviz/lib/timeline.dart
75 11 2
Widget build()
in web/github_dataviz/lib/main.dart
83 11 1
String generateRandomHeadline()
in platform_design/lib/utils.dart
27 11 0
Widget build()
in experimental/linting_tool/lib/pages/home_page.dart
54 10 1
void setSelectedChips()
in web/samples_index/web/main.dart
21 10 0
Widget build()
in experimental/linting_tool/lib/pages/default_lints_page.dart
65 9 1
void paint()
in web/github_dataviz/lib/layered_chart.dart
79 8 2
String searchQueryFromParams()
in web/samples_index/lib/src/search.dart
17 8 1
Widget build()
in web/form_app/lib/src/validation.dart
136 8 1
Widget build()
in form_app/lib/src/validation.dart
136 8 1