aws-amplify / amplify-js
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,345 units with 36,003 lines of code in units (54.7% of code).
    • 2 very complex units (401 lines of code)
    • 6 complex units (763 lines of code)
    • 74 medium complex units (5,209 lines of code)
    • 262 simple units (8,869 lines of code)
    • 2,001 very simple units (20,761 lines of code)
1% | 2% | 14% | 24% | 57%
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
c12% | 18% | 28% | 22% | 18%
java0% | 22% | 12% | 5% | 59%
ts0% | 0% | 14% | 25% | 60%
tsx0% | 0% | 8% | 27% | 63%
js0% | 0% | 16% | 20% | 62%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
packages/amazon-cognito-identity-js6% | 9% | 25% | 21% | 36%
packages/pushnotification0% | 16% | 9% | 17% | 56%
packages/datastore0% | 0% | 21% | 24% | 53%
packages/auth0% | 0% | 35% | 15% | 48%
packages/aws-amplify-react0% | 0% | 10% | 30% | 59%
packages/storage0% | 0% | 29% | 19% | 50%
packages/aws-amplify-react-native0% | 0% | 15% | 17% | 66%
packages/xr0% | 0% | 32% | 0% | 67%
packages/api-rest0% | 0% | 35% | 40% | 24%
packages/aws-amplify-angular0% | 0% | 4% | 18% | 76%
packages/core0% | 0% | 3% | 38% | 57%
packages/pubsub0% | 0% | 9% | 16% | 73%
packages/predictions0% | 0% | 4% | 27% | 68%
scripts0% | 0% | 18% | 0% | 81%
packages/datastore-storage-adapter0% | 0% | 3% | 31% | 64%
packages/amplify-ui-components0% | 0% | 0% | 28% | 71%
packages/analytics0% | 0% | 0% | 31% | 68%
packages/aws-amplify-vue0% | 0% | 0% | 26% | 73%
packages/interactions0% | 0% | 0% | 46% | 53%
packages/geo0% | 0% | 0% | 19% | 80%
packages/api-graphql0% | 0% | 0% | 0% | 100%
packages/aws-amplify0% | 0% | 0% | 0% | 100%
packages/amplify-ui-react0% | 0% | 0% | 0% | 100%
packages/api0% | 0% | 0% | 0% | 100%
packages/amplify-ui-storybook0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
int mp_toom_mul()
in packages/amazon-cognito-identity-js/ios/JKBigInteger/LibTomMath/tommath.c
196 60 3
int mp_exptmod_fast()
in packages/amazon-cognito-identity-js/ios/JKBigInteger/LibTomMath/tommath.c
205 58 5
int s_mp_exptmod()
in packages/amazon-cognito-identity-js/ios/JKBigInteger/LibTomMath/tommath.c
160 49 5
public void sendToNotificationCentre()
in packages/pushnotification/android/src/main/java/com/amazonaws/amplify/pushnotification/modules/RNPushNotificationHelper.java
184 42 1
int mp_invmod_slow()
in packages/amazon-cognito-identity-js/ios/JKBigInteger/LibTomMath/tommath.c
110 39 3
int mp_div()
in packages/amazon-cognito-identity-js/ios/JKBigInteger/LibTomMath/tommath.c
130 36 4
int mp_prime_next_prime()
in packages/amazon-cognito-identity-js/ios/JKBigInteger/LibTomMath/tommath.c
95 32 3
int fast_mp_invmod()
in packages/amazon-cognito-identity-js/ios/JKBigInteger/LibTomMath/tommath.c
84 26 3
private RNPushNotificationAttributes()
in packages/pushnotification/android/src/main/java/com/amazonaws/amplify/pushnotification/modules/RNPushNotificationAttributes.java
29 25 1
function dimToMake()
in packages/core/src/ClientDevice/ios.ts
39 22 1
int mp_karatsuba_mul()
in packages/amazon-cognito-identity-js/ios/JKBigInteger/LibTomMath/tommath.c
79 22 3
int mp_exteuclid()
in packages/amazon-cognito-identity-js/ios/JKBigInteger/LibTomMath/tommath.c
38 22 5
int mp_prime_random_ex()
in packages/amazon-cognito-identity-js/ios/JKBigInteger/LibTomMath/tommath.c
54 21 6
int mp_div()
in packages/amazon-cognito-identity-js/ios/JKBigInteger/LibTomMath/tommath.c
55 21 4
sortFields()
in packages/aws-amplify-react-native/src/Auth/SignUp.tsx
53 20 0
public async copy()
in packages/storage/src/providers/AWSS3Provider.ts
102 20 3
public async get()
in packages/storage/src/providers/AWSS3Provider.ts
121 20 2
function bnpDivRemTo()
in packages/amazon-cognito-identity-js/src/BigInteger.js
57 20 3
sortFields()
in packages/aws-amplify-react/src/Auth/SignUp.tsx
53 20 0
public put()
in packages/storage/src/providers/AWSS3Provider.ts
125 19 3