facebookincubator / OSM-HOT-Tasking-Manager
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 1,277 units with 24,502 lines of code in units (49.7% of code).
    • 0 very complex units (0 lines of code)
    • 4 complex units (836 lines of code)
    • 34 medium complex units (2,718 lines of code)
    • 107 simple units (3,626 lines of code)
    • 1,132 very simple units (17,322 lines of code)
0% | 3% | 11% | 14% | 70%
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% | 4% | 10% | 12% | 72%
py0% | 2% | 11% | 17% | 68%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
frontend/src0% | 4% | 10% | 12% | 72%
backend/services0% | 3% | 12% | 19% | 64%
backend/models0% | 4% | 18% | 10% | 67%
migrations/versions0% | 0% | 17% | 8% | 74%
backend/api0% | 0% | 3% | 32% | 63%
backend0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
migrations0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
342 50 6
133 48 2
251 45 3
110 36 2
40 24 2
38 24 2
251 22 1
142 22 12
69 20 0
85 19 1
59 18 1
227 17 13
99 17 2
67 16 3
94 16 1
29 15 4
29 15 4
30 15 2
122 15 1
30 15 2
49 15 3
234 14 0
71 14 2
66 14 1
66 13 0
158 13 1
95 12 7
22 12 2
36 12 3
19 12 2
116 11 10
60 11 9
33 11 2
114 11 1
39 11 1
51 11 1
37 11 1
41 11 1
75 10 0
81 10 1
68 10 0
18 10 1
20 10 1
15 10 1
118 10 1
32 10 2
34 10 2
50 10 3
39 10 2
32 10 4