microsoft / moodle-local_onenote
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 54 units with 1,088 lines of code in units (83.4% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (82 lines of code)
    • 5 medium complex units (311 lines of code)
    • 6 simple units (272 lines of code)
    • 42 very simple units (423 lines of code)
0% | 7% | 28% | 25% | 38%
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
php0% | 7% | 28% | 25% | 38%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
classes/api0% | 9% | 34% | 23% | 32%
db0% | 0% | 0% | 100% | 0%
classes/privacy0% | 0% | 0% | 0% | 100%
classes0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public function get_page()
in classes/api/base.php
82 26 6
public function get_items_list()
in classes/api/base.php
103 20 1
52 18 2
56 17 0
public function download_page()
in classes/api/base.php
58 11 2
protected function process_tags()
in classes/api/base.php
42 11 2
44 10 0
56 10 3
54 10 1
53 8 4
44 8 3
protected function get_section()
in classes/api/base.php
21 7 2
protected function sync_sections()
in classes/api/base.php
24 5 3
34 5 6
19 5 1
25 4 5
19 4 1
public static function delete_data_for_user()
in classes/privacy/provider.php
10 4 1
13 4 1
11 3 3