aws-amplify / amplify-flutter
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,222 units with 21,871 lines of code in units (47.9% of code).
    • 1 very complex units (496 lines of code)
    • 2 complex units (241 lines of code)
    • 22 medium complex units (1,103 lines of code)
    • 47 simple units (1,653 lines of code)
    • 2,150 very simple units (18,378 lines of code)
2% | 1% | 5% | 7% | 84%
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
dart3% | 1% | 5% | 6% | 83%
swift0% | 2% | 6% | 6% | 85%
kt0% | 0% | 0% | 17% | 82%
rb0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
packages/amplify_authenticator8% | 0% | 6% | 5% | 79%
packages/amplify_auth_cognito0% | 6% | 4% | 8% | 80%
packages/amplify_datastore0% | 0% | 10% | 10% | 79%
packages/amplify_datastore_plugin_interface0% | 0% | 4% | 3% | 91%
packages/amplify_analytics_pinpoint0% | 0% | 0% | 18% | 81%
packages/amplify_api0% | 0% | 0% | 7% | 92%
packages/amplify_flutter0% | 0% | 0% | 8% | 91%
packages/amplify_analytics_plugin_interface0% | 0% | 0% | 22% | 77%
packages/amplify_storage_s30% | 0% | 0% | 1% | 98%
example/lib0% | 0% | 0% | 0% | 100%
packages/amplify_auth_plugin_interface0% | 0% | 0% | 0% | 100%
packages/amplify_core0% | 0% | 0% | 0% | 100%
packages/amplify_api_plugin_interface0% | 0% | 0% | 0% | 100%
packages/amplify_storage_plugin_interface0% | 0% | 0% | 0% | 100%
packages/amplify_test0% | 0% | 0% | 0% | 100%
tool0% | 0% | 0% | 0% | 100%
build-support0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
String resolve()
in packages/amplify_authenticator/lib/src/l10n/country_resolver.dart
496 247 2
func handleAuthError()
in packages/amplify_auth_cognito/ios/Classes/AuthErrorHandler.swift
83 42 2
Exception castAndReturnPlatformException()
in packages/amplify_auth_cognito/lib/amplify_auth_error_handling.dart
158 34 1
String toString()
in packages/amplify_datastore/example/lib/models/ModelWithAppsyncScalarTypes.dart
100 24 0
ModelType getModelTypeByModelName()
in packages/amplify_datastore/example/lib/models/ModelProvider.dart
54 24 1
func sendPayload()
in packages/amplify_datastore/ios/Classes/DataStoreHubEventStreamHandler.swift
93 21 1
String toString()
in packages/amplify_datastore/example/lib/models/CustomTypeWithAppsyncScalarTypes.dart
83 21 0
String title()
in packages/amplify_authenticator/lib/src/l10n/input_resolver.dart
43 19 2
QuerySnapshot withSubscriptionEvent()
in packages/amplify_datastore_plugin_interface/lib/src/types/models/query_snapshot.dart
41 19 2
String resolve()
in packages/amplify_authenticator/lib/src/l10n/button_resolver.dart
36 17 2
func createAuthUserAttributeKey()
in packages/amplify_auth_cognito/ios/Classes/Utils/UserAttributeDeserialization.swift
39 16 1
Stream _signIn()
in packages/amplify_authenticator/lib/src/blocs/auth/auth_bloc.dart
67 15 1
List runtimeFields()
in packages/amplify_authenticator/lib/src/widgets/form.dart
59 15 1
func setCodeDeliveryDetails()
in packages/amplify_auth_cognito/ios/Classes/FlutterSignInResult.swift
19 15 1
factory ModelWithAppsyncScalarTypes()
in packages/amplify_datastore/example/lib/models/ModelWithAppsyncScalarTypes.dart
87 15 29
Stream _eventTransformer()
in packages/amplify_authenticator/lib/src/blocs/auth/auth_bloc.dart
29 14 1
Widget builder()
in packages/amplify_authenticator/lib/src/screens/authenticator_screen.dart
44 13 3
func setCodeDeliveryDetails()
in packages/amplify_auth_cognito/ios/Classes/FlutterSignUpResult.swift
29 13 1
func setAdditionalInfo()
in packages/amplify_auth_cognito/ios/Classes/FlutterSignInResult.swift
24 13 1
func setState()
in packages/amplify_auth_cognito/ios/Classes/FlutterSignInResult.swift
24 13 1