facebook / facebook-python-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 2,474 units with 42,322 lines of code in units (67.9% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (43 lines of code)
    • 8 medium complex units (323 lines of code)
    • 1,104 simple units (36,789 lines of code)
    • 1,361 very simple units (5,167 lines of code)
0% | <1% | <1% | 86% | 12%
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
py0% | <1% | <1% | 86% | 12%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
facebook_business0% | 4% | 17% | 12% | 65%
facebook_business/adobjects/serverside0% | 0% | 6% | 23% | 70%
facebook_business/adobjects0% | 0% | <1% | 90% | 9%
facebook_business/adobjects/helpers0% | 0% | 11% | 21% | 66%
facebook_business/utils0% | 0% | 0% | 30% | 69%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
43 26 4
61 24 3
36 19 3
47 14 1
31 13 1
38 13 3
52 13 2
26 12 2
32 11 3
35 10 12
30 10 1
61 10 7
61 10 7
61 10 7
61 10 7
21 9 3
23 9 1
23 9 1
23 9 1
23 9 1
23 9 1
23 9 1
69 9 7
20 9 3
14 8 1
39 7 8
15 7 1
10 7 2
39 7 8
38 7 8
40 7 8
36 7 8
60 7 8
60 7 8
39 7 8
60 7 8
60 7 8
32 7 8
39 7 8
26 6 1
8 6 1
30 6 1
10 6 2
28 6 7
28 6 7
28 6 7
42 6 7
28 6 7
29 6 7
28 6 7