microsoft / moodle-local_o365
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 805 units with 18,789 lines of code in units (80.5% of code).
    • 21 very long units (4,208 lines of code)
    • 62 long units (4,492 lines of code)
    • 166 medium size units (5,299 lines of code)
    • 186 small units (2,706 lines of code)
    • 370 very small units (2,084 lines of code)
22% | 23% | 28% | 14% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
php22% | 24% | 28% | 14% | 10%
js0% | 17% | 23% | 17% | 40%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
classes/feature28% | 27% | 28% | 10% | 4%
classes/page31% | 34% | 20% | 6% | 6%
lang/en100% | 0% | 0% | 0% | 0%
db99% | 0% | 0% | 0% | <1%
classes/task35% | 30% | 23% | 4% | 6%
classes/webservices20% | 22% | 25% | 22% | 9%
ROOT25% | 0% | 35% | 14% | 23%
classes/bot0% | 74% | 19% | 5% | <1%
classes/adminsetting0% | 28% | 28% | 14% | 27%
classes/rest0% | 8% | 38% | 29% | 22%
classes0% | 25% | 43% | 21% | 8%
classes/privacy0% | 44% | 0% | 34% | 21%
classes/oauth20% | 11% | 42% | 26% | 20%
classes/form0% | 0% | 55% | 34% | 9%
classes/healthcheck0% | 0% | 92% | 0% | 7%
classes/event0% | 0% | 0% | 0% | 100%
classes/obj0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
Both display name()
in lang/en/local_o365.php
593 7 1
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
186 13 0
public static function assignments_read()
in classes/webservices/read_assignments.php
183 20 4
public function sync_users()
in classes/feature/usersync/main.php
181 40 1
168 23 0
164 16 0
public function create_groups_for_new_courses()
in classes/feature/usergroups/coursegroups.php
160 44 0
159 35 1
public function mode_usermatch()
in classes/page/acp.php
151 25 0
public function execute()
in classes/task/processmatchqueue.php
146 16 0
public function resync_group_membership()
in classes/feature/usergroups/coursegroups.php
145 26 3
public function execute()
in classes/task/usersync.php
139 26 0
public function mode_editgroup()
in classes/page/groupcp.php
128 23 0
127 11 0
public static function apply_configured_fieldmap()
in classes/feature/usersync/main.php
119 30 3
public function mode_connection()
in classes/page/ucp.php
118 43 0
public static function handle_course_reset_started()
in classes/feature/usergroups/observers.php
114 30 1