microsoft / o365-moodle
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,334 units with 27,071 lines of code in units (72.2% of code).
    • 2 very complex units (926 lines of code)
    • 20 complex units (2,566 lines of code)
    • 88 medium complex units (6,413 lines of code)
    • 200 simple units (6,800 lines of code)
    • 1,024 very simple units (10,366 lines of code)
3% | 9% | 23% | 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
php3% | 10% | 24% | 25% | 36%
js0% | 0% | 9% | 25% | 65%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
local/o365/db99% | 0% | 0% | 0% | <1%
local/o365/classes2% | 9% | 25% | 26% | 36%
repository/office3650% | 25% | 55% | 9% | 9%
blocks/microsoft0% | 42% | 11% | 10% | 35%
auth/oidc/classes0% | 14% | 36% | 7% | 41%
auth/oidc/db0% | 100% | 0% | 0% | 0%
local/onenote/classes0% | 7% | 30% | 21% | 40%
local/o3650% | 0% | 25% | 10% | 63%
mod/assign/submission0% | 0% | 22% | 20% | 56%
filter/oembed/db0% | 0% | 95% | 0% | 5%
auth/oidc0% | 0% | 16% | 36% | 46%
filter/oembed0% | 0% | 31% | 13% | 55%
filter/oembed/provider0% | 0% | 17% | 0% | 82%
filter/oembed/amd0% | 0% | 3% | 28% | 67%
local/o365/lang0% | 0% | 0% | 100% | 0%
filter/oembed/classes0% | 0% | 0% | 47% | 52%
mod/assign/feedback0% | 0% | 0% | 30% | 69%
theme/boost_o365teams0% | 0% | 0% | 44% | 55%
local/onenote/db0% | 0% | 0% | 100% | 0%
theme/boost_o365teams/classes0% | 0% | 0% | 0% | 100%
theme/boost_o365teams/amd0% | 0% | 0% | 0% | 100%
blocks/microsoft/db0% | 0% | 0% | 0% | 100%
blocks/microsoft/js0% | 0% | 0% | 0% | 100%
blocks/microsoft/classes0% | 0% | 0% | 0% | 100%
local/office365/classes0% | 0% | 0% | 0% | 100%
repository/office365/classes0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function xmldb_local_o365_upgrade()
in local/o365/db/upgrade.php
582 147 1
public static function runsync()
in local/o365/classes/feature/sds/task/sync.php
344 74 1
function xmldb_auth_oidc_upgrade()
in auth/oidc/db/upgrade.php
211 49 1
public static function update_subscriptions()
in local/o365/classes/feature/calsync/form/subscriptions.php
189 49 5
public function create_groups_for_new_courses()
in local/o365/classes/feature/usergroups/coursegroups.php
160 44 0
public function mode_connection()
in local/o365/classes/page/ucp.php
118 43 0
public function sync_users()
in local/o365/classes/feature/usersync/main.php
181 40 1
protected function get_user_content_connected()
in blocks/microsoft/block_microsoft.php
127 36 0
public function create_outlook_event_from_moodle_event()
in local/o365/classes/feature/calsync/main.php
159 35 1
public function disconnect()
in auth/oidc/classes/loginflow/base.php
117 30 5
public static function handle_course_reset_started()
in local/o365/classes/feature/usergroups/observers.php
114 30 1
public static function apply_configured_fieldmap()
in local/o365/classes/feature/usersync/main.php
119 30 3
protected function get_course_content()
in blocks/microsoft/block_microsoft.php
95 29 0
protected function sync_courseevents()
in local/o365/classes/feature/calsync/task/syncoldevents.php
112 28 2
protected function sync_existing_user()
in local/o365/classes/feature/usersync/main.php
82 27 4
public function get_listing()
in repository/office365/lib.php
105 27 2
public function get_userinfo()
in auth/oidc/classes/loginflow/base.php
98 26 1
public function resync_group_membership()
in local/o365/classes/feature/usergroups/coursegroups.php
145 26 3
public function suspend_users()
in local/o365/classes/feature/usersync/main.php
78 26 2
public function execute()
in local/o365/classes/task/usersync.php
139 26 0