facebook / facebook-ruby-business-sdk
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 255 units with 2,548 lines of code in units (11.1% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (213 lines of code)
    • 17 medium complex units (701 lines of code)
    • 17 simple units (384 lines of code)
    • 219 very simple units (1,250 lines of code)
0% | 8% | 27% | 15% | 49%
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
rb0% | 8% | 27% | 15% | 49%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/facebook_ads/ad_objects/server_side0% | 13% | 43% | 15% | 28%
lib/facebook_ads/ad_objects/helpers0% | 0% | 34% | 40% | 24%
lib/facebook_ads0% | 0% | 0% | 12% | 87%
lib/facebook_ads/field_types0% | 0% | 0% | 32% | 67%
lib/facebook_ads/batch_api0% | 0% | 0% | 0% | 100%
lib/facebook_ads/helpers0% | 0% | 0% | 0% | 100%
lib/facebook_ads/videos0% | 0% | 0% | 0% | 100%
spec0% | 0% | 0% | 0% | 100%
lib0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
121 35 0
92 35 1
27 25 1
73 24 0
73 24 0
53 19 1
46 19 2
19 17 1
61 16 0
51 16 0
32 16 2
46 15 0
37 13 1
15 13 1
33 12 1
45 12 0
37 12 0
40 12 0
13 11 1
28 10 1
31 10 0
26 9 8
11 9 1
28 9 0
30 9 0
28 9 0
10 7 0
13 7 0
38 7 0
21 7 1
15 6 1
15 6 2
21 6 2
22 6 1
34 6 0
13 6 1
13 5 1
7 5 1
15 5 1
6 4 0
9 4 2
8 4 1
8 4 1
10 4 1
11 4 3
13 4 0
6 4 0
18 4 0
11 4 2
11 4 3