flutter / plugins
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 3,933 units with 42,583 lines of code in units (55.1% of code).
    • 3 very complex units (1,520 lines of code)
    • 1 complex units (266 lines of code)
    • 56 medium complex units (3,995 lines of code)
    • 124 simple units (4,619 lines of code)
    • 3,749 very simple units (32,183 lines of code)
3% | <1% | 9% | 10% | 75%
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
java12% | 2% | 10% | 10% | 64%
dart0% | 0% | 8% | 11% | 79%
m0% | 0% | 40% | 21% | 37%
cpp0% | 0% | 2% | 5% | 91%
swift0% | 0% | 0% | 0% | 100%
cc0% | 0% | 0% | 0% | 100%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
packages/webview_flutter14% | 0% | 4% | 8% | 72%
packages/camera5% | 0% | 5% | 16% | 72%
packages/google_maps_flutter0% | 3% | 11% | 5% | 79%
script/tool0% | 0% | 31% | 19% | 48%
packages/video_player0% | 0% | 15% | 7% | 77%
packages/local_auth0% | 0% | 20% | 3% | 75%
packages/in_app_purchase0% | 0% | 4% | 19% | 75%
packages/image_picker0% | 0% | 5% | 24% | 70%
packages/shared_preferences0% | 0% | 5% | 2% | 91%
packages/quick_actions0% | 0% | 24% | 0% | 75%
packages/file_selector0% | 0% | 3% | 6% | 90%
packages/url_launcher0% | 0% | 2% | 1% | 96%
packages/path_provider0% | 0% | 1% | 11% | 86%
packages/google_sign_in0% | 0% | 0% | 17% | 82%
packages/plugin_platform_interface0% | 0% | 0% | 81% | 18%
packages/ios_platform_images0% | 0% | 0% | 0% | 100%
packages/espresso0% | 0% | 0% | 0% | 100%
packages/flutter_plugin_android_lifecycle0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
static void setup()
in packages/webview_flutter/webview_flutter_android/android/src/main/java/io/flutter/plugins/webviewflutter/GeneratedAndroidWebView.java
792 104 2
public void onMethodCall()
in packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/MethodCallHandlerImpl.java
300 61 2
static void setup()
in packages/webview_flutter/webview_flutter_android/android/src/main/java/io/flutter/plugins/webviewflutter/GeneratedAndroidWebView.java
428 56 2
public void onMethodCall()
in packages/google_maps_flutter/google_maps_flutter/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java
266 40 2
Future _testAndroid()
in script/tool/lib/src/native_test_command.dart
109 23 2
static void setup()
in packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/Messages.java
264 23 2
static void InterpretMapOptions()
in packages/google_maps_flutter/google_maps_flutter/ios/Classes/GoogleMapController.m
68 22 2
Stream _getAllPackages()
in script/tool/lib/src/common/plugin_command.dart
92 21 0
static void interpretGoogleMapOptions()
in packages/google_maps_flutter/google_maps_flutter/android/src/main/java/io/flutter/plugins/googlemaps/Convert.java
84 19 2
Widget _captureControlRowWidget()
in packages/camera/camera/example/lib/main.dart
59 19 0
private void process()
in packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/CameraCaptureCallback.java
65 19 1
Future _runXcodeTests()
in script/tool/lib/src/native_test_command.dart
81 18 5
Future _checkForMissingChangeError()
in script/tool/lib/src/version_check_command.dart
67 18 1
static WebResourceErrorType _errorCodeToErrorType()
in packages/webview_flutter/webview_flutter_android/lib/webview_android_widget.dart
39 17 1
private void authenticate()
in packages/local_auth/local_auth/android/src/main/java/io/flutter/plugins/localauth/LocalAuthPlugin.java
82 17 2
Future runForPackage()
in script/tool/lib/src/drive_examples_command.dart
73 16 1
public void onMethodCall()
in packages/shared_preferences/shared_preferences_android/android/src/main/java/io/flutter/plugins/sharedpreferences/MethodCallHandlerImpl.java
69 16 2
Future initialize()
in packages/video_player/video_player/lib/video_player.dart
94 16 0
Future _handleMethodCall()
in packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart
97 16 2
Future runForPackage()
in script/tool/lib/src/firebase_test_lab_command.dart
67 15 1