microsoft / moodle-auth_oidc
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 128 units with 2,164 lines of code in units (54.2% of code).
    • 2 very long units (328 lines of code)
    • 7 long units (525 lines of code)
    • 24 medium size units (726 lines of code)
    • 15 small units (225 lines of code)
    • 80 very small units (360 lines of code)
15% | 24% | 33% | 10% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
php15% | 24% | 33% | 10% | 16%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
db100% | 0% | 0% | 0% | 0%
classes/loginflow13% | 46% | 25% | 8% | 5%
ROOT0% | 31% | 47% | 8% | 12%
classes0% | 0% | 44% | 23% | 31%
classes/privacy0% | 0% | 47% | 25% | 27%
classes/adminsetting0% | 0% | 47% | 11% | 40%
classes/form0% | 0% | 100% | 0% | 0%
classes/event0% | 0% | 0% | 0% | 100%
classes/task0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
211 49 1
public function disconnect()
in classes/loginflow/base.php
117 30 5
public function get_userinfo()
in classes/loginflow/base.php
98 26 1
protected function handlelogin()
in classes/loginflow/authcode.php
91 21 4
protected function handleauthresponse()
in classes/loginflow/authcode.php
81 24 1
72 13 7
protected function handlemigration()
in classes/loginflow/authcode.php
67 13 5
64 4 0
public function loginpage_hook()
in classes/loginflow/rocreds.php
52 11 2
protected function definition()
in classes/form/disconnect.php
49 11 0
protected function checkrestrictions()
in classes/loginflow/base.php
48 13 1
protected function createtoken()
in classes/loginflow/base.php
43 12 7
public function user_login()
in classes/loginflow/rocreds.php
40 13 2
public function handleredirect()
in classes/loginflow/authcode.php
36 9 0
36 12 2
public static function get_metadata()
in classes/privacy/provider.php
34 3 1
32 7 3
public function output_html()
in classes/adminsetting/auth_oidc_admin_setting_iconselect.php
29 4 2
29 11 1
28 9 1