aws-samples / aws-amplify-react-native-events-app-workshop
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 39 units with 781 lines of code in units (47.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 4 simple units (204 lines of code)
    • 35 very simple units (577 lines of code)
0% | 0% | 0% | 26% | 73%
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
js0% | 0% | 0% | 27% | 72%
java0% | 0% | 0% | 20% | 80%
m0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
sample/src/screens0% | 0% | 0% | 28% | 71%
sample/src/utils0% | 0% | 0% | 43% | 56%
sample/android/app/src/main0% | 0% | 0% | 33% | 66%
sample/android/app/src/debug0% | 0% | 0% | 0% | 100%
sample0% | 0% | 0% | 0% | 100%
sample/src/components0% | 0% | 0% | 0% | 100%
sample/src0% | 0% | 0% | 0% | 100%
sample/ios/awsamplifyreactnative0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
async function updateDatabaseUser()
in sample/src/utils/users.js
42 8 3
private static void initializeFlipper()
in sample/android/app/src/main/java/com/awsamplifyreactnative/MainApplication.java
19 6 2
export default function ChatScreen()
in sample/src/screens/ChatScreen.js
84 6 1
export default function AccountScreen()
in sample/src/screens/AccountScreen.js
59 6 0
async function getAllEvents()
in sample/src/screens/HomeScreen.js
19 5 0
export default function EventBox()
in sample/src/components/EventBox.js
29 5 1
export default function()
in sample/src/screens/HomeScreen.js
86 4 2
export default function EventScreen()
in sample/src/screens/EventScreen.js
47 4 1
export default function CreateScreen()
in sample/src/screens/CreateScreen.js
64 4 1
public static void initializeFlipper()
in sample/android/app/src/debug/java/com/awsamplifyreactnative/ReactNativeFlipper.java
39 3 2
public void onCreate()
in sample/android/app/src/main/java/com/awsamplifyreactnative/MainApplication.java
8 2 0
function getCognitoUser()
in sample/src/utils/users.js
14 2 1
async function updateEndpoint()
in sample/src/utils/users.js
28 2 4
async function authUser()
in sample/src/screens/HomeScreen.js
11 2 0
async function authUser()
in sample/src/screens/ChatScreen.js
6 2 0
async function createEventChat()
in sample/src/screens/ChatScreen.js
16 2 3
async function authUser()
in sample/src/screens/EventScreen.js
6 2 0
Roboto: require()
in sample/App.js
13 2 1
Roboto_medium: require()
in sample/App.js
12 2 1
module.exports = function()
in sample/babel.config.js
6 1 1