facebookincubator / python-nubia
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 239 units with 1,784 lines of code in units (58.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 9 medium complex units (346 lines of code)
    • 16 simple units (357 lines of code)
    • 214 very simple units (1,081 lines of code)
0% | 0% | 19% | 20% | 60%
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% | 0% | 19% | 20% | 60%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
nubia/internal/typing0% | 0% | 52% | 17% | 30%
nubia/internal0% | 0% | 6% | 17% | 76%
nubia_complete0% | 0% | 0% | 55% | 44%
nubia/internal/io0% | 0% | 0% | 31% | 68%
example0% | 0% | 0% | 0% | 100%
nubia/internal/ui0% | 0% | 0% | 0% | 100%
nubia/internal/commands0% | 0% | 0% | 0% | 100%
example/commands0% | 0% | 0% | 0% | 100%
example/commands/more0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
83 23 2
39 21 1
38 15 1
56 15 1
16 12 2
34 12 2
24 11 1
28 11 2
28 11 2
17 10 3
20 10 1
48 9 4
32 9 3
6 8 2
21 8 2
17 7 3
20 7 2
27 7 1
19 7 2
40 6 1
20 6 2
24 6 4
6 6 3
16 6 1
24 6 1
14 5 1
21 5 2
7 5 3
17 5 2
9 5 2
11 5 3
12 5 2
7 5 2
13 5 3
16 4 3
9 4 2
23 4 2
6 4 1
9 4 2
6 4 2
14 4 1
18 4 3
6 4 3
7 4 2
7 4 3
10 4 1
16 4 4
7 3 2
45 3 1
20 3 1