microsoft / o365-moodle
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 1,334 units with 27,071 lines of code in units (72.2% of code).
    • 30 very long units (5,384 lines of code)
    • 85 long units (6,062 lines of code)
    • 245 medium size units (7,706 lines of code)
    • 277 small units (4,105 lines of code)
    • 697 very small units (3,814 lines of code)
19% | 22% | 28% | 15% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
php21% | 23% | 28% | 14% | 12%
js0% | 10% | 23% | 23% | 42%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
local/o365/classes16% | 26% | 29% | 15% | 11%
local/o365/lang100% | 0% | 0% | 0% | 0%
local/o365/db99% | 0% | 0% | 0% | <1%
repository/office36553% | 27% | 9% | 1% | 7%
auth/oidc/db100% | 0% | 0% | 0% | 0%
blocks/microsoft24% | 29% | 14% | 22% | 8%
local/o36525% | 0% | 35% | 14% | 23%
mod/assign/submission22% | 0% | 23% | 19% | 33%
auth/oidc/classes7% | 25% | 34% | 12% | 20%
local/onenote/classes9% | 34% | 25% | 14% | 15%
filter/oembed0% | 79% | 13% | 0% | 7%
auth/oidc0% | 31% | 47% | 8% | 12%
filter/oembed/db0% | 95% | 0% | 0% | 5%
local/onenote/db0% | 100% | 0% | 0% | 0%
filter/oembed/classes0% | 0% | 57% | 25% | 17%
filter/oembed/amd0% | 0% | 25% | 27% | 46%
mod/assign/feedback0% | 0% | 41% | 23% | 34%
theme/boost_o365teams0% | 0% | 75% | 19% | 4%
filter/oembed/provider0% | 0% | 27% | 51% | 21%
theme/boost_o365teams/classes0% | 0% | 0% | 55% | 44%
theme/boost_o365teams/amd0% | 0% | 0% | 28% | 71%
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%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
Both display name()
in local/o365/lang/en/local_o365.php
593 7 1
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 mode_usergroupcustom()
in local/o365/classes/page/acp.php
186 13 0
public static function assignments_read()
in local/o365/classes/webservices/read_assignments.php
183 20 4
public function sync_users()
in local/o365/classes/feature/usersync/main.php
181 40 1
public function mode_teamconnections()
in local/o365/classes/page/acp.php
168 23 0
public function mode_sharepointcourseselect()
in local/o365/classes/page/acp.php
164 16 0
public function create_groups_for_new_courses()
in local/o365/classes/feature/usergroups/coursegroups.php
160 44 0
public function create_outlook_event_from_moodle_event()
in local/o365/classes/feature/calsync/main.php
159 35 1
public function mode_usermatch()
in local/o365/classes/page/acp.php
151 25 0
public function execute()
in local/o365/classes/task/processmatchqueue.php
146 16 0
public function resync_group_membership()
in local/o365/classes/feature/usergroups/coursegroups.php
145 26 3
public function execute()
in local/o365/classes/task/usersync.php
139 26 0
137 20 5
protected function get_listing_groups()
in repository/office365/lib.php
135 26 1
public function mode_editgroup()
in local/o365/classes/page/groupcp.php
128 23 0
protected function get_user_content_connected()
in blocks/microsoft/block_microsoft.php
127 36 0