flutter / codelabs
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 2,914 units with 32,631 lines of code in units (55.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (107 lines of code)
    • 21 simple units (1,023 lines of code)
    • 2,892 very simple units (31,501 lines of code)
0% | 0% | <1% | 3% | 96%
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% | <1% | 3% | 96%
ts0% | 0% | 0% | 34% | 65%
java0% | 0% | 0% | 27% | 72%
cpp0% | 0% | 0% | 0% | 100%
cc0% | 0% | 0% | 0% | 100%
swift0% | 0% | 0% | 0% | 100%
c0% | 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
webview_flutter0% | 0% | 7% | 6% | 86%
firebase-get-to-know-flutter0% | 0% | 0% | 13% | 86%
in_app_purchases0% | 0% | 0% | 11% | 88%
cupertino_store0% | 0% | 0% | 3% | 96%
plugin_codelab0% | 0% | 0% | 8% | 91%
adaptive_app0% | 0% | 0% | <1% | 99%
dartpad_codelabs0% | 0% | 0% | 0% | 100%
photos-sharing0% | 0% | 0% | 0% | 100%
startup_namer0% | 0% | 0% | 0% | 100%
friendly_chat0% | 0% | 0% | 0% | 100%
github-client0% | 0% | 0% | 0% | 100%
testing_codelab0% | 0% | 0% | 0% | 100%
star_counter0% | 0% | 0% | 0% | 100%
cookbook0% | 0% | 0% | 0% | 100%
google-maps-in-flutter0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
Widget build()
in webview_flutter/step_12/lib/src/menu.dart
107 13 1
Widget build()
in webview_flutter/step_11/lib/src/menu.dart
86 10 1
private async handleValidation()
in in_app_purchases/step_10/firebase-backend/functions/src/app-store.purchase-handler.ts
53 9 2
private async handleValidation()
in in_app_purchases/complete/firebase-backend/functions/src/app-store.purchase-handler.ts
53 9 2
void purchasesUpdate()
in in_app_purchases/complete/app/lib/logic/dash_purchases.dart
34 8 0
String platformDescription()
in adaptive_app/step_03/lib/main.dart
19 8 0
SliverChildBuilderDelegate _buildSliverChildBuilderDelegate()
in cupertino_store/step_06/lib/shopping_cart_tab.dart
72 8 1
Widget build()
in in_app_purchases/step_10/app/lib/pages/purchase_page.dart
35 7 1
Future _handlePurchase()
in in_app_purchases/step_10/app/lib/logic/dash_purchases.dart
21 7 1
Widget build()
in in_app_purchases/complete/app/lib/pages/purchase_page.dart
35 7 1
Future _handlePurchase()
in in_app_purchases/complete/app/lib/logic/dash_purchases.dart
21 7 1
async handleSubscription()
in in_app_purchases/step_10/firebase-backend/functions/src/google-play.purchase-handler.ts
61 6 3
void _handlePurchase()
in in_app_purchases/step_08/app/lib/logic/dash_purchases.dart
18 6 1
void _handlePurchase()
in in_app_purchases/step_09/app/lib/logic/dash_purchases.dart
18 6 1
async handleSubscription()
in in_app_purchases/complete/firebase-backend/functions/src/google-play.purchase-handler.ts
60 6 3
Widget build()
in firebase-get-to-know-flutter/step_04/lib/src/authentication.dart
69 6 1
Widget build()
in firebase-get-to-know-flutter/step_05/lib/src/authentication.dart
69 6 1
Widget build()
in firebase-get-to-know-flutter/step_02/lib/src/authentication.dart
69 6 1
Widget build()
in firebase-get-to-know-flutter/step_09/lib/src/authentication.dart
69 6 1
Widget build()
in firebase-get-to-know-flutter/step_07/lib/src/authentication.dart
69 6 1