dart-lang / oauth2
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 24 units with 426 lines of code in units (64.3% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (66 lines of code)
    • 8 medium size units (258 lines of code)
    • 3 small units (39 lines of code)
    • 12 very small units (63 lines of code)
0% | 15% | 60% | 9% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
dart0% | 15% | 60% | 9% | 14%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/src0% | 16% | 64% | 5% | 13%
example0% | 0% | 0% | 60% | 40%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
Credentials handleAccessTokenResponse()
in lib/src/handle_access_token_response.dart
66 16 7
Future refresh()
in lib/src/credentials.dart
44 12 5
Future resourceOwnerPasswordGrant()
in lib/src/resource_owner_password_grant.dart
42 6 12
void _handleErrorResponse()
in lib/src/handle_access_token_response.dart
32 12 3
Future clientCredentialsGrant()
in lib/src/client_credentials_grant.dart
32 6 9
Future handleAuthorizationResponse()
in lib/src/authorization_code_grant.dart
31 9 1
Future _handleAuthorizationCode()
in lib/src/authorization_code_grant.dart
28 4 1
Future refreshCredentials()
in lib/src/client.dart
25 4 1
Future send()
in lib/src/client.dart
24 8 1
Future createClient()
in example/main.dart
15 2 0
Map parseJsonParameters()
in lib/src/parameters.dart
13 5 2
Map Function()
in lib/src/authorization_code_grant.dart
11 1 2
String toString()
in lib/src/authorization_exception.dart
9 3 0
Future handleAuthorizationCode()
in lib/src/authorization_code_grant.dart
9 3 1
String toJson()
in lib/src/credentials.dart
8 1 0
Map Function()
in lib/src/credentials.dart
7 2 2
void main()
in example/main.dart
5 1 0
static String _createCodeVerifier()
in lib/src/authorization_code_grant.dart
4 1 0
void close()
in lib/src/authorization_code_grant.dart
4 1 0
void close()
in lib/src/client.dart
4 1 0