Code Analysis: WPO365 | MICROSOFT 365 GRAPH MAILER 3.4

Function Rating Maintainability Complexity Lines of code
Wpo\Services\Authentication_Service::skip_authentication()
D
16
83 190
Wpo\Mail\Mailer::send()
D
16
67 232
Wpo\Core\Plugin_Helpers::check_license()
D
22
33 226
Wpo\Services\Access_Token_Service::get_access_token()
D
24
34 180
Wpo\Services\Graph_Service::fetch()
D
26
37 134
Wpo\Services\Id_Token_Service::process_openidconnect_code()
D
28
34 123
Wpo\Services\Access_Token_Service::get_app_only_access_token()
D
28
32 128
Wpo\Services\Wp_Config_Service::get_parseable_options()
D
33 33 88
Wpo\Core\Extensions_Helpers::get_extensions()
D
18
11 402
Wpo\Services\Notifications_Service::show_admin_notices()
C
30 28 124
Wpo\Services\Router_Service::has_route()
C
33 27 93
Wpo\Pages\License_Page::activate_license()
C
30 24 124
Wpo\Services\Wp_Config_Service::ensure_aad_options()
C
33 22 107
Wpo\Mail\Mail_Authorization_Helpers::authorize_mail_user()
C
34 23 88
Wpo\Mail\Mail_Authorization_Helpers::get_mail_access_token_delegated()
C
30 20 132
Wpo\Services\Password_Credentials_Service::check_password_credentials_expiration()
B
34 22 85
Wpo\Services\Id_Token_Service::get_openidconnect_url()
B
33 21 91
Wpo\Services\Id_Token_Service::check_audience()
B
37 19 74
Wpo\MsGraphMailer::add_wp_hooks()
B
34 18 78
Wpo\Services\Router_Service::skip_authentication_response()
B
37 17 82
Wpo\Services\Jwt_Token_Service::validate_signature()
B
35 17 82
Wpo\Mail\Mail_Authorization_Helpers::get_mail_auth_configuration()
B
38 18 64
Wpo\Mail\Mailer::validate_email_addresses()
B
40 18 55
Wpo\Core\Script_Helpers::enqueue_wizard()
B
33 15 92
Wpo\Services\Jwt_Token_Service::get_json_web_key_sets_uri()
B
37 16 70
Wpo\Services\Jwt_Token_Service::get_key_from_set()
B
43 17 44
Wpo\Pages\License_Page::deactivate_license()
B
38 15 67
Wpo\Services\Request_Service::get_instance()
B
42 16 50
Wpo\Services\Authentication_Service::user_from_domain()
B
40 15 64
Wpo\Core\Wpmu_Helpers::wpmu_add_user_to_blog()
B
41 16 49
Wpo\Core\Url_Helpers::goto_after()
A
40 15 55
Wpo\Services\Request_Service::shutdown()
A
42 15 52
Wpo\Core\Shortcode_Helpers::login_button()
A
42 15 48
Wpo\Mail\Mailer::email_message_encode()
A
42 14 61
Wpo\Services\Access_Token_Service::save_access_tokens()
A
41 14 57
Wpo\Services\Event_Service::get_insights_summary()
A
40 14 54
Wpo\Services\Error_Service::get_error_message()
A
39 13 62
Wpo\Core\Plugin_Helpers::get_version_from_remote()
A
40 13 56
Wpo\Services\Authentication_Service::authenticate_request()
A
40 13 55
Wpo\Services\Options_Service::is_wpo365_configured()
A
43 13 47
Wpo\Core\Url_Helpers::get_state_url()
A
41 12 56
Wpo\Core\Script_Helpers::get_react_urls()
A
51 14 24
Wpo\Services\Wp_Config_Service::ensure_mail_options()
A
42 12 52
Wpo\Services\Options_Service::ensure_options_cache()
A
46 13 37
Wpo\Services\Event_Service::get_event_user()
A
49 13 33
Wpo\Services\Access_Token_Service::get_cached_access_token()
A
43 12 46
Wpo\Services\Log_Service::flush_log()
A
46 12 36
Wpo\Services\Wp_Config_Service::dynamically_redirect_to_idp()
A
44 11 42
Wpo\Services\Graph_Service::is_fetch_result_ok()
A
49 12 27
Wpo\Core\Url_Helpers::ensure_trailing_slash_url()
A
47 11 36
Wpo\Core\Globals::get_url_info()
A
46 11 35
Wpo\Mail\Mail_Authorization_Helpers::try_migrate_mail_app_principal_info()
A
45 10 42
Wpo\Services\Event_Service::get_insights()
A
45 10 40
Wpo\Pages\License_Page::license_page()
A
36 5 114
Wpo\Services\Wp_Config_Service::apply_overrides()
A
48 10 32
Wpo\Services\Authentication_Service::authenticate_oidc_user()
A
40 8 59
Wpo\Services\Router_Service::process_state_url()
A
45 9 43
Wpo\Mail\Mailer::mg_fetch()
A
41 8 58
Wpo\Services\Router_Service::route_openidconnect_code()
A
46 9 36
Wpo\Services\Authentication_Service::authenticate_saml2_user()
A
39 7 66
Wpo\Mail\Mailer::mail_from()
A
51 9 27
Wpo\Core\Permissions_Helpers::prevent_email_change()
A
51 9 26
Wpo\Mail\Mail_Authorization_Helpers::get_mail_authorization_url()
A
44 8 41
Wpo\Core\Permissions_Helpers::generate_password()
A
46 8 39
Wpo\Services\Ajax_Service::cors_proxy()
A
42 7 51
Wpo\Services\Authentication_Service::goodbye()
A
46 8 36
Wpo\Services\Log_Service::write_log()
A
46 8 34
Wpo\Mail\Mailer::init()
A
48 8 33
Wpo\Mail\Mailer::send_test_mail()
A
46 8 33
Wpo\Pages\Wizard_Page::add_management_page()
A
49 8 32
Wpo\Services\Authentication_Service::redirect_to_microsoft()
A
48 8 31
Wpo\Mail\Mailer::to_array_of_valid_email_addresses()
A
49 8 31
Wpo\Services\Options_Service::update_options()
A
49 8 31
Wpo\Services\Id_Token_Service::process_openidconnect_token()
A
50 8 27
Wpo\Services\Access_Token_Service::user_has_delegated_access()
A
48 7 37
Wpo\Services\Access_Token_Service::get_refresh_token()
A
47 7 35
Wpo\Services\Access_Token_Service::validate_access_token()
A
55 8 18
Wpo\Mail\Mail_Authorization_Helpers::get_mail_access_token()
A
45 6 47
Wpo\Services\Authentication_Service::check_private_pages()
S
58 8 13
Wpo\Mail\Mailer::update_mail_log()
S
50 7 27
Wpo\Services\Options_Service::get_aad_option()
S
51 7 26
Wpo\Core\Plugin_Helpers::show_old_version_warning()
S
52 7 22
Wpo\Pages\License_Page::activation_notice()
S
55 7 20
Wpo\Services\Options_Service::get_global_boolean_var()
S
58 7 13
Wpo\Core\Shortcode_Helpers::add_pintra_shortcode()
S
50 6 26
Wpo\Core\Wpmu_Helpers::switch_blog()
S
51 6 25
Wpo\Services\Event_Service::key2params()
S
52 6 25
Wpo\Core\Wpmu_Helpers::user_site_name()
S
52 6 25
Wpo\Services\Options_Service::get_mail_option()
S
51 6 25
Wpo\Services\Ajax_Service::verify_ajax_request()
S
52 6 24
Wpo\Core\Plugin_Helpers::get_plugin_update_info()
S
52 6 24
Wpo\Core\Extensions_Helpers::get_active_extensions()
S
53 6 22
Wpo\Core\Plugin_Helpers::check_for_updates()
S
54 6 22
Wpo\Core\Wpmu_Helpers::wpmu_access_denied_splash()
S
47 5 36
Wpo\Services\Nonce_Service::create_nonce()
S
54 6 21
Wpo\Core\Shortcode_Helpers::validate_script_url()
S
48 5 36
Wpo\Core\Url_Helpers::is_wp_login()
S
54 6 20
Wpo\Services\Authentication_Service::is_deactivated()
S
54 6 18
Wpo\Pages\License_Page::__construct()
S
56 6 18
Wpo\Services\Access_Token_Service::get_application_roles()
S
56 6 18
Wpo\Services\Authentication_Service::user_in_group()
S
50 5 32
Wpo\Core\Plugin_Helpers::plugin_info()
S
56 6 17
Wpo\Core\Url_Helpers::url_ensure_absolute()
S
50 5 31
Wpo\Core\Plugin_Helpers::get_tested_version()
S
57 6 15
Wpo\Core\Script_Helpers::enqueue_pintra_redirect()
S
56 6 15
Wpo\Services\Ajax_Service::switch_wpmu_mode()
S
56 6 15
Wpo\Core\WordPress_Helpers::hide_admin_bar()
S
58 6 15
Wpo\Mail\Mailer::check_wp_mail()
S
49 5 30
Wpo\Services\Access_Token_Service::token_has_role()
S
59 6 14
Wpo\Core\Permissions_Helpers::block_password_update()
S
59 6 13
Wpo\Services\Event_Service::user_created_fail__handler()
S
51 5 26
Wpo\Services\Ajax_Service::get_multiple_idps()
S
53 5 23
Wpo\Core\Wpmu_Helpers::get_blog_id_from_host_and_path()
S
53 5 22
Wpo\Services\Nonce_Service::verify_nonce()
S
54 5 20
Wpo\Services\Notifications_Service::dismiss_admin_notices()
S
55 5 20
Wpo\Services\Ajax_Service::get_settings()
S
55 5 19
Wpo\Services\Ajax_Service::copy_main_site_options()
S
54 5 19
Wpo\Core\Url_Helpers::get_redirect_url()
S
56 5 17
Wpo\Core\Plugin_Helpers::is_premium_edition_active()
S
57 5 16
Wpo\Services\Event_Service::flush_events()
S
49 4 31
Wpo\Services\Router_Service::route_openidconnect_initiate()
S
57 5 16
Wpo\Core\Plugin_Helpers::force_check_for_plugin_updates()
S
58 5 15
Wpo\Services\Ajax_Service::delete_settings()
S
50 4 28
Wpo\Services\Ajax_Service::update_settings()
S
60 5 11
Wpo\Services\Ajax_Service::get_mail_authorization_url()
S
61 5 11
Wpo\Services\Options_Service::mu_use_subsite_options()
S
62 5 11
Wpo\Core\Url_Helpers::get_login_urls()
S
54 4 23
Wpo\Core\Shortcode_Helpers::add_sign_in_with_microsoft_shortcode_V2()
S
52 4 22
Wpo\Services\Authentication_Service::destroy_session()
S
54 4 21
Wpo\Services\Event_Service::user_created__handler()
S
53 4 21
Wpo\Services\Event_Service::user_updated__handler()
S
53 4 21
Wpo\Services\Event_Service::user_updated_fail__handler()
S
53 4 21
Wpo\Services\Router_Service::route_mail_authorize()
S
54 4 21
Wpo\Core\Url_Helpers::force_redirect()
S
54 4 20
Wpo\Services\Ajax_Service::send_test_mail()
S
53 4 20
Wpo\Core\WordPress_Helpers::base64_url_decode()
S
56 4 19
Wpo\Services\Ajax_Service::get_tokencache()
S
56 4 17
Wpo\Core\Permissions_Helpers::is_wpo_admin()
S
58 4 16
Wpo\Core\Url_Helpers::try_get_redirect_to_query_arg()
S
59 4 15
Wpo\Core\WordPress_Helpers::get_allowed_html()
S
42 1 60
Wpo\Services\Error_Service::check_for_login_messages()
S
58 4 15
Wpo\Services\Log_Service::get_ai_props()
S
57 4 15
Wpo\Services\Router_Service::route_initiate_user_authentication()
S
58 4 14
Wpo\Core\WordPress_Helpers::time_zone_corrected_formatted_date()
S
60 4 13
Wpo\Core\Plugin_Helpers::request_recently_failed()
S
61 4 12
Wpo\Core\Wpmu_Helpers::set_user_primary_blog()
S
61 4 12
Wpo\Core\Url_Helpers::ensure_trailing_slash_path()
S
60 4 12
Wpo\Services\Event_Service::ensure_events_table()
S
52 3 26
Wpo\Services\Options_Service::get_global_var()
S
62 4 11
Wpo\Services\Log_Service::to_ai_message()
S
52 3 25
Wpo\Core\Globals::set_global_vars()
S
51 3 24
Wpo\Core\Plugin_Helpers::show_license_notices()
S
55 3 23
Wpo\Services\Access_Token_Service::get_authorization_code()
S
54 3 22
Wpo\Services\Options_Service::to_camel_case()
S
56 3 19
Wpo\MsGraphMailer::deactivation_hooks()
S
51 2 33
Wpo\Core\Plugin_Helpers::get_plugin_license_key()
S
57 3 17
Wpo\Services\Ajax_Service::export_sp_meta()
S
56 3 17
Wpo\Services\Event_Service::truncate_insights_data()
S
56 3 17
Wpo\Services\Id_Token_Service::decode_id_token()
S
57 3 16
Wpo\Mail\Mailer::check_phpmailer()
S
57 3 16
Wpo\Services\Access_Token_Service::save_authorization_code()
S
58 3 16
Wpo\Services\Ajax_Service::get_insights()
S
56 3 16
Wpo\Services\Password_Credentials_Service::send_secret_expired_notification()
S
52 2 31
Wpo\Mail\Mailer::implode_to()
S
64 4 9
Wpo\Services\Wp_Config_Service::get_multiple_idps()
S
63 4 10
Wpo\Services\Options_Service::remove_aad_options()
S
50 2 30
Wpo\Core\Request::get_item()
S
65 4 9
Wpo\Services\Ajax_Service::verify_posted_data()
S
63 4 10
Wpo\Core\Wpmu_Helpers::mu_get_transient()
S
69 4 6
Wpo\MsGraphMailer::load()
S
58 3 15
Wpo\Core\Extensions_Helpers::plugin_updated()
S
71 4 5
Wpo\Core\Wpmu_Helpers::mu_set_transient()
S
67 4 7
Wpo\Services\Wp_Config_Service::get_options_overrides()
S
63 4 10
Wpo\Core\Plugin_Helpers::get_configuration_action_link()
S
65 4 8
Wpo\Core\Request::remove_item()
S
64 4 10
Wpo\Core\Wpmu_Helpers::mu_delete_transient()
S
68 4 7
Wpo\Services\Event_Service::get_scim_attributes()
S
58 3 15
Wpo\Core\Extensions_Helpers::get_active_extension_dir()
S
63 4 9
Wpo\Services\Ajax_Service::get_insights_summary()
S
57 3 15
Wpo\Services\Wp_Config_Service::get_single_idp()
S
63 4 10
Wpo\Core\Wpmu_Helpers::get_options_blog_id()
S
63 4 9
Wpo\Core\Permissions_Helpers::must_use_delegate_access_for_scope()
S
69 4 6
Wpo\Services\Ajax_Service::get_parseable_options()
S
58 3 14
Wpo\Services\Ajax_Service::try_migrate_mail_app_principal_info()
S
58 3 14
Wpo\Services\Event_Service::add_event()
S
59 3 14
Wpo\Services\Ajax_Service::get_self_test_results()
S
59 3 13
Wpo\Core\Url_Helpers::get_current_url()
S
60 3 13
Wpo\Services\Ajax_Service::get_log()
S
60 3 13
Wpo\Services\Ajax_Service::import_idp_meta()
S
59 3 13
Wpo\Core\Shortcode_Helpers::add_display_error_message_shortcode()
S
59 3 13
Wpo\Services\Router_Service::route_saml2_response()
S
61 3 12
Wpo\Services\Ajax_Service::is_wpo365_configured()
S
60 3 12
Wpo\Services\Ajax_Service::truncate_insights_data()
S
60 3 12
Wpo\Core\Plugin_Helpers::check_licenses()
S
62 3 11
Wpo\Services\Options_Service::add_update_option()
S
62 3 11
Wpo\Services\Event_Service::user_loggedin_fail__handler()
S
52 2 25
Wpo\Services\Wp_Config_Service::get_aad_option_keys()
S
50 1 35
Wpo\Services\Access_Token_Service::delete_tokens()
S
57 2 17
Wpo\Core\Domain_Helpers::is_tenant_domain()
S
65 3 8
Wpo\Core\Shortcode_Helpers::ensure_login_button_short_code_v2()
S
67 3 8
Wpo\Core\Request::set_item()
S
65 3 10
Wpo\Core\WordPress_Helpers::strpos()
S
71 3 5
Wpo\Services\Options_Service::get_global_list_var()
S
64 3 10
Wpo\Services\Password_Credentials_Service::ensure_check_password_credentials_expiration()
S
66 3 7
Wpo\Services\Event_Service::get_events_table_name()
S
68 3 7
Wpo\Core\Url_Helpers::is_basic_auth_api_request()
S
65 3 8
Wpo\Core\WordPress_Helpers::stripos()
S
71 3 5
Wpo\Services\Options_Service::get_options()
S
64 3 10
Wpo\Services\Options_Service::get_global_string_var()
S
62 3 10
Wpo\Services\Options_Service::delete_options()
S
68 3 7
Wpo\Services\Router_Service::route_openidconnect_token()
S
63 3 10
Wpo\Core\Shortcode_Helpers::ensure_display_error_message_short_code()
S
67 3 8
Wpo\Services\Wp_Config_Service::get_string_option()
S
70 3 6
Wpo\Services\Options_Service::from_camel_case()
S
60 2 14
Wpo\Services\Access_Token_Service::save_refresh_token()
S
60 2 14
Wpo\Services\Event_Service::user_loggedin__handler()
S
59 2 13
Wpo\Services\Ajax_Service::get_mail_auth_configuration()
S
60 2 12
Wpo\Services\Log_Service::to_ai_exception()
S
53 1 23
Wpo\Services\Log_Service::flush_log_to_ai()
S
53 1 22
Wpo\Services\Options_Service::get_default_options()
S
54 1 22
Wpo\Core\Cron_Helpers::add_cron_schedules()
S
55 1 21
Wpo\Core\Wpmu_Helpers::mu_is_network_admin()
S
77 2 3
Wpo\Services\Ajax_Service::get_wpo_health_messages()
S
64 2 9
Wpo\Services\Dependency_Service::get_instance()
S
71 2 6
Wpo\Services\Dependency_Service::remove()
S
73 2 5
Wpo\Core\Url_Helpers::get_preferred_login_url()
S
70 2 6
Wpo\Core\Shortcode_Helpers::ensure_wpo365_redirect_script_sc()
S
73 2 5
Wpo\Core\WordPress_Helpers::trim()
S
74 2 4
Wpo\Core\Shortcode_Helpers::add_wpo365_redirect_script_sc()
S
74 2 5
Wpo\Services\Request_Service::get_request()
S
68 2 7
Wpo\Core\Script_Helpers::enqueue_script_asynchronously()
S
70 2 6
Wpo\Services\Dependency_Service::get()
S
71 2 6
Wpo\Services\Event_Service::authenticate__handler()
S
71 2 6
Wpo\Services\Ajax_Service::delete_tokens()
S
64 2 9
Wpo\Services\Log_Service::enable_curl_logging()
S
62 2 10
Wpo\Core\Url_Helpers::is_wp_rest_api()
S
62 2 10
Wpo\Services\Options_Service::get_global_numeric_var()
S
74 2 4
Wpo\Core\Shortcode_Helpers::ensure_sso_button_sc()
S
73 2 5
Wpo\Services\Log_Service::to_ai()
S
70 2 6
Wpo\Core\Shortcode_Helpers::ensure_pintra_short_code()
S
73 2 5
Wpo\Core\WordPress_Helpers::rtrim()
S
74 2 4
Wpo\Core\WordPress_Helpers::ltrim()
S
74 2 4
Wpo\Core\Shortcode_Helpers::ensure_login_button_short_code()
S
73 2 5
Wpo\Services\Router_Service::route_saml2_initiate()
S
63 2 10
Wpo\Core\Domain_Helpers::get_smtp_domain_from_email_address()
S
67 2 7
Wpo\Services\Ajax_Service::dismiss_wpo_health_messages()
S
64 2 9
Wpo\Services\Wp_Config_Service::get_boolean_option()
S
70 2 6
Wpo\Services\Options_Service::get_secret_options()
S
61 1 15
Wpo\Services\Ajax_Service::ajax_response()
S
62 1 12
Wpo\Core\Event::__construct()
S
61 1 12
Wpo\MsGraphMailer::update_request_log()
S
67 1 7
Wpo\MsGraphMailer::__construct()
S
72 1 5
Wpo\Core\Request::current_request_id()
S
82 1 3
Wpo\Core\Script_Helpers::add_admin_bar_styles()
S
77 1 3
Wpo\Pages\License_Page::license_menu()
S
78 1 3
Wpo\Core\WordPress_Helpers::base64_url_encode()
S
65 1 10
Wpo\Core\Url_Helpers::remove_protocol_and_www()
S
71 1 5
Wpo\Core\WordPress_Helpers::safe_css()
S
69 1 7
Wpo\Core\Extensions_Helpers::plugin_activated()
S
76 1 4
Wpo\Services\Wp_Config_Service::get_mail_option_keys()
S
69 1 8
Wpo\MsGraphMailer::cache_dependencies()
S
75 1 4
Wpo\Core\Request::__construct()
S
81 1 3
Wpo\Core\Permissions_Helpers::show_password_fields()
S
79 1 3
Wpo\Services\Event_Service::mail_sent_fail__handler()
S
71 1 5
Wpo\Core\Extensions_Helpers::plugin_deactivated()
S
75 1 4
Wpo\Services\Request_Service::__construct()
S
91 1 2
Wpo\Core\Cron_Helpers::suppress_doing_it_wrong_trigger_error()
S
81 1 3
Wpo\Core\Url_Helpers::add_query_vars_filter()
S
66 1 9
Wpo\Services\Event_Service::wp_login_failed__handler()
S
80 1 3
Wpo\Core\Url_Helpers::undress_url()
S
68 1 7
Wpo\MsGraphMailer::ensure_wpo365_login()
S
67 1 9
Wpo\Services\Dependency_Service::__construct()
S
91 1 2
Wpo\Services\Dependency_Service::add()
S
80 1 3
Wpo\Core\Url_Helpers::leadingslashit()
S
78 1 3
Wpo\Services\Router_Service::route_openidconnect_error()
S
80 1 3
Wpo\Services\Event_Service::mail_sent__handler()
S
71 1 5
Wpo\Services\Router_Service::route_plugin_selftest()
S
66 1 8
Wpo\Core\Permissions_Helpers::allow_password_reset()
S
79 1 3
Wpo\Pages\Wizard_Page::wpo365_wizard_page()
S
69 1 6
Wpo\Core\Shortcode_Helpers::add_sso_button_sc()
S
76 1 4
Wpo\Core\Request::clear()
S
81 1 3
Wpo\Core\Permissions_Helpers::user_is_admin()
S
79 1 3
Wpo\Core\Plugin_Helpers::log_failed_request()
S
73 1 4