microsoft / moodle-auth_oidc
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 128 units with 2,164 lines of code in units (54.2% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (426 lines of code)
    • 12 medium complex units (630 lines of code)
    • 11 simple units (278 lines of code)
    • 102 very simple units (830 lines of code)
0% | 19% | 29% | 12% | 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
php0% | 19% | 29% | 12% | 38%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
classes/loginflow0% | 25% | 52% | 10% | 11%
db0% | 100% | 0% | 0% | 0%
ROOT0% | 0% | 16% | 36% | 46%
classes0% | 0% | 21% | 8% | 70%
classes/form0% | 0% | 100% | 0% | 0%
classes/privacy0% | 0% | 0% | 0% | 100%
classes/adminsetting0% | 0% | 0% | 0% | 100%
classes/event0% | 0% | 0% | 0% | 100%
classes/task0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex 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 handleauthresponse()
in classes/loginflow/authcode.php
81 24 1
protected function handlelogin()
in classes/loginflow/authcode.php
91 21 4
protected function handlemigration()
in classes/loginflow/authcode.php
67 13 5
protected function checkrestrictions()
in classes/loginflow/base.php
48 13 1
public function user_login()
in classes/loginflow/rocreds.php
40 13 2
72 13 7
protected function get_oidcclient()
in classes/loginflow/base.php
22 12 0
protected function createtoken()
in classes/loginflow/base.php
43 12 7
36 12 2
protected function definition()
in classes/form/disconnect.php
49 11 0
29 11 1
public function loginpage_hook()
in classes/loginflow/rocreds.php
52 11 2
25 10 0
28 9 1
public function handleredirect()
in classes/loginflow/authcode.php
36 9 0
27 9 3
24 8 1