facebook / react-native-website
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 64 units with 1,354 lines of code in units (31.9% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (144 lines of code)
    • 1 medium complex units (56 lines of code)
    • 9 simple units (323 lines of code)
    • 53 very simple units (831 lines of code)
0% | 10% | 4% | 23% | 61%
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% | 10% | 4% | 23% | 61%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
sync-api-docs0% | 20% | 7% | 30% | 41%
website0% | 0% | 0% | 75% | 25%
website/src/theme/NavbarItem0% | 0% | 0% | 75% | 24%
website/src/pages0% | 0% | 0% | 0% | 100%
website/src/pages/animations0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
144 43 1
56 12 2
29 9 1
53 9 6
35 8 1
54 8 1
17 6 1
24 6 1
61 6 1
38 6 1
12 6 1
22 5 2
22 5 2
19 5 1
17 5 1
13 4 1
6 4 1
13 4 1
39 4 1
13 3 1
22 3 1
16 3 2
6 3 1
5 3 1
21 3 1
24 3 0
9 2 1
9 2 2
8 2 1
17 2 0
14 2 3
71 2 0
17 2 1
18 2 0
10 2 0
3 1 1
3 1 1
5 1 2
12 1 3
3 1 1
6 1 1
6 1 1
12 1 1
3 1 1
7 1 4
9 1 3
18 1 0
10 1 1
13 1 0
9 1 5