facebookincubator / facebook-for-magento2
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 338 units with 4,374 lines of code in units (67.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 6 medium complex units (409 lines of code)
    • 7 simple units (215 lines of code)
    • 325 very simple units (3,750 lines of code)
0% | 0% | 9% | 4% | 85%
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
php0% | 0% | 10% | 4% | 85%
js0% | 0% | 0% | 7% | 92%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Helper0% | 0% | 20% | 7% | 72%
Setup0% | 0% | 60% | 13% | 26%
Model0% | 0% | 2% | 4% | 92%
view0% | 0% | 0% | 7% | 92%
Block0% | 0% | 0% | 0% | 100%
Controller0% | 0% | 0% | 0% | 100%
Observer0% | 0% | 0% | 0% | 100%
Cron0% | 0% | 0% | 0% | 100%
Logger0% | 0% | 0% | 0% | 100%
Plugin0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
41 23 2
155 16 2
58 14 0
43 14 1
73 13 2
39 12 2
35 10 2
48 10 1
27 8 0
28 7 1
22 7 0
31 6 0
24 6 2
29 5 1
33 5 1
29 5 1
13 5 0
8 5 1
24 5 0
21 4 1
20 4 1
17 4 0
29 4 0
24 4 0
20 4 0
19 4 1
8 4 1
30 4 2
6 4 0
15 4 1
22 4 1
17 4 0
24 4 0
14 4 0
14 4 0
13 4 0
19 4 0
30 4 0
30 4 0
14 4 0
18 4 0
13 4 0
16 3 1
23 3 1
15 3 1
10 3 1
22 3 0
23 3 0
18 3 0
16 3 0