microsoft / moodle-local_o365
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 805 units with 18,789 lines of code in units (80.5% of code).
    • 2 very complex units (926 lines of code)
    • 12 complex units (1,596 lines of code)
    • 58 medium complex units (4,560 lines of code)
    • 140 simple units (5,097 lines of code)
    • 593 very simple units (6,610 lines of code)
4% | 8% | 24% | 27% | 35%
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
php5% | 8% | 24% | 27% | 34%
js0% | 0% | 26% | 29% | 43%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
db99% | 0% | 0% | 0% | <1%
classes/feature6% | 25% | 20% | 28% | 18%
classes/task0% | 17% | 50% | 18% | 13%
classes/page0% | 4% | 55% | 18% | 22%
classes0% | 0% | 50% | 23% | 26%
classes/rest0% | 0% | 10% | 25% | 63%
classes/webservices0% | 0% | 36% | 16% | 46%
classes/adminsetting0% | 0% | 13% | 27% | 59%
ROOT0% | 0% | 25% | 10% | 63%
lang/en0% | 0% | 0% | 100% | 0%
classes/bot0% | 0% | 0% | 56% | 43%
classes/oauth20% | 0% | 0% | 42% | 57%
classes/form0% | 0% | 0% | 23% | 76%
classes/privacy0% | 0% | 0% | 0% | 100%
classes/healthcheck0% | 0% | 0% | 0% | 100%
classes/event0% | 0% | 0% | 0% | 100%
classes/obj0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
582 147 1
public static function runsync()
in classes/feature/sds/task/sync.php
344 74 1
public static function update_subscriptions()
in classes/feature/calsync/form/subscriptions.php
189 49 5
public function create_groups_for_new_courses()
in classes/feature/usergroups/coursegroups.php
160 44 0
public function mode_connection()
in classes/page/ucp.php
118 43 0
public function sync_users()
in classes/feature/usersync/main.php
181 40 1
159 35 1
public static function handle_course_reset_started()
in classes/feature/usergroups/observers.php
114 30 1
public static function apply_configured_fieldmap()
in classes/feature/usersync/main.php
119 30 3
protected function sync_courseevents()
in classes/feature/calsync/task/syncoldevents.php
112 28 2
protected function sync_existing_user()
in classes/feature/usersync/main.php
82 27 4
public function resync_group_membership()
in classes/feature/usergroups/coursegroups.php
145 26 3
public function suspend_users()
in classes/feature/usersync/main.php
78 26 2
public function execute()
in classes/task/usersync.php
139 26 0
public function mode_usermatch()
in classes/page/acp.php
151 25 0
168 23 0
public function mode_editgroup()
in classes/page/groupcp.php
128 23 0
public static function study_groups_list()
in classes/feature/usergroups/utils.php
79 22 6
public function get_events()
in classes/rest/unified.php
52 22 4
protected function check_usercreationrestriction()
in classes/feature/usersync/main.php
67 21 1