facebook / screenshot-tests-for-android
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 313 units with 2,518 lines of code in units (60.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 6 medium complex units (345 lines of code)
    • 13 simple units (266 lines of code)
    • 294 very simple units (1,907 lines of code)
0% | 0% | 13% | 10% | 75%
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
java0% | 0% | 13% | 12% | 74%
py0% | 0% | 10% | 9% | 80%
kt0% | 0% | 37% | 0% | 62%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
core/src/main/java/com0% | 0% | 14% | 11% | 74%
plugin/src/py/android_screenshot_tests0% | 0% | 10% | 8% | 80%
plugin/src/main/kotlin/com0% | 0% | 52% | 0% | 47%
layout-hierarchy-common/src/main/java/com0% | 0% | 0% | 38% | 61%
layout-hierarchy-litho/src/main/java/com0% | 0% | 0% | 0% | 100%
sample/src/main/java/com0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
52 16 1
27 12 2
69 12 1
51 12 0
33 11 2
113 11 1
31 10 2
38 9 1
17 8 1
12 8 2
20 8 1
19 8 4
24 7 2
12 7 1
27 7 1
15 6 0
25 6 2
13 6 2
13 6 1
35 5 1
12 5 0
20 5 1
21 5 3
14 5 0
11 5 2
17 5 3
19 5 6
21 5 4
16 5 4
11 5 0
17 4 0
9 4 1
10 4 0
23 4 1
31 4 1
11 4 0
17 4 0
14 4 0
6 4 1
25 4 1
13 4 1
8 4 1
5 4 1
23 4 2
26 4 4
20 4 4
5 3 0
9 3 1
13 3 0
10 3 3