facebook / facebook-business-sdk-codegen
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 925 units with 7,566 lines of code in units (47.8% of code).
    • 0 very complex units (0 lines of code)
    • 5 complex units (504 lines of code)
    • 19 medium complex units (988 lines of code)
    • 41 simple units (1,099 lines of code)
    • 860 very simple units (4,975 lines of code)
0% | 6% | 13% | 14% | 65%
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% | 17% | 27% | 20% | 34%
java0% | 5% | 7% | 14% | 71%
php0% | 2% | 4% | 8% | 84%
py0% | 3% | 19% | 15% | 61%
rb0% | 0% | 3% | 14% | 81%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/processors0% | 33% | 52% | 7% | 5%
templates/java/src0% | 5% | 7% | 14% | 71%
templates/php/src0% | 2% | 4% | 8% | 84%
templates/python/facebook_business0% | 3% | 19% | 15% | 61%
templates/ruby/lib0% | 0% | 3% | 15% | 81%
src/renderers0% | 0% | 0% | 92% | 7%
templates/nodejs/src0% | 0% | 0% | 18% | 81%
src/loaders0% | 0% | 0% | 26% | 73%
templates/nodejs0% | 0% | 0% | 0% | 100%
src/common0% | 0% | 0% | 0% | 100%
templates/ruby/spec0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
175 39 2
60 30 3
43 26 4
85 26 4
141 26 2
78 21 2
94 20 2
36 19 3
70 19 2
52 19 1
44 17 1
74 17 3
69 17 1
38 16 2
32 16 2
47 14 1
74 14 5
31 13 1
38 13 3
52 13 2
26 12 2
51 12 1
50 12 2
32 11 3
33 10 1
21 9 3
69 9 7
20 9 3
32 9 0
14 8 1
25 8 3
22 8 1
36 8 2
60 8 5
32 8 2
17 8 2
27 7 1
37 7 0
38 7 0
21 7 1
21 7 1
21 7 1
17 6 0
18 6 0
25 6 4
26 6 1
8 6 1
30 6 1
10 6 2
13 6 2