aws / amazon-ivs-react-native-player
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 87 units with 1,079 lines of code in units (42.9% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (335 lines of code)
    • 1 medium complex units (113 lines of code)
    • 2 simple units (50 lines of code)
    • 83 very simple units (581 lines of code)
0% | 31% | 10% | 4% | 53%
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
tsx0% | 61% | 20% | 0% | 17%
swift0% | 0% | 0% | 21% | 78%
java0% | 0% | 0% | 19% | 80%
kt0% | 0% | 0% | 0% | 100%
js0% | 0% | 0% | 0% | 100%
m0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
example/src/screens0% | 66% | 22% | 0% | 10%
ios0% | 0% | 0% | 21% | 78%
example/android/app0% | 0% | 0% | 19% | 80%
android/src/main0% | 0% | 0% | 0% | 100%
example/src0% | 0% | 0% | 0% | 100%
example0% | 0% | 0% | 0% | 100%
src0% | 0% | 0% | 0% | 100%
example/ios/AmazonIvsExample0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export default function PlaygroundExample()
in example/src/screens/PlaygroundExample.tsx
335 26 0
export default function AdvancedExample()
in example/src/screens/AdvancedExample.tsx
113 19 0
func addPlayerObserver()
in ios/AmazonIvsView.swift
32 8 0
private static void initializeFlipper()
in example/android/app/src/main/java/com/example/amazonivsreactnative/MainApplication.java
18 6 2
func player()
in ios/AmazonIvsView.swift
30 5 2
override fun onCue()
in android/src/main/java/com/amazonaws/ivs/reactnative/player/AmazonIvsView.kt
7 3 1
fun onPlayerStateChange()
in android/src/main/java/com/amazonaws/ivs/reactnative/player/AmazonIvsView.kt
37 3 1
function parseDuration()
in src/IVSPlayer.tsx
6 3 1
func player()
in ios/AmazonIvsView.swift
21 3 2
public static void initializeFlipper()
in example/android/app/src/debug/java/com/example/amazonivsreactnative/ReactNativeFlipper.java
39 3 2
fun setQuality()
in android/src/main/java/com/amazonaws/ivs/reactnative/player/AmazonIvsView.kt
5 2 1
fun setAutoMaxQuality()
in android/src/main/java/com/amazonaws/ivs/reactnative/player/AmazonIvsView.kt
5 2 1
override fun getExportedCustomDirectEventTypeConstants()
in android/src/main/java/com/amazonaws/ivs/reactnative/player/AmazonIvsViewManager.kt
7 2 0
func removePlayerObserver()
in ios/AmazonIvsView.swift
6 2 0
func removeProgressObserver()
in ios/AmazonIvsView.swift
6 2 0
func removeTimePointObserver()
in ios/AmazonIvsView.swift
6 2 0
func player()
in ios/AmazonIvsView.swift
15 2 2
function Header()
in example/src/App.tsx
9 2 2
override fun toString()
in android/src/main/java/com/amazonaws/ivs/reactnative/player/AmazonIvsView.kt
3 1 0
override fun onStateChanged()
in android/src/main/java/com/amazonaws/ivs/reactnative/player/AmazonIvsView.kt
3 1 1