83% login-with-azure

Code Review | Login with Azure (Azure SSO)

WordPress plugin Login with Azure (Azure SSO) scored83%from 54 tests.

About plugin

  • Plugin page: login-with-azure
  • Plugin version: 1.5.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1
  • WordPress version: 6.3.1
  • First release: Apr 2, 2020
  • Latest release: Nov 10, 2022
  • Number of updates: 41
  • Update frequency: every 26.5 days
  • Top authors: cyberlord92 (80.49%)manishchopra (14.63%)ameyatammewar (9.76%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /9,422 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.91ms] Passed 4 tests

A check of server-side resources used by Login with Azure (Azure SSO)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.59 ▼4.98
Dashboard /wp-admin3.33 ▲0.0346.83 ▼8.82
Posts /wp-admin/edit.php3.45 ▲0.0949.38 ▲0.19
Add New Post /wp-admin/post-new.php5.93 ▲0.0590.82 ▼5.66
Media Library /wp-admin/upload.php3.26 ▲0.0333.37 ▼0.16

Server storage [IO: ▲3.70MB] [DB: ▲0.00MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 106 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_mo_oauth_widget
db_upgraded
host_name
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Login with Azure (Azure SSO)
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,981 ▲19513.59 ▼1.011.70 ▼0.5540.82 ▼2.93
Dashboard /wp-admin2,384 ▲1785.54 ▲0.64108.79 ▼0.3488.57 ▲44.66
Posts /wp-admin/edit.php2,260 ▲1572.34 ▲0.3351.28 ▲13.5937.47 ▲0.21
Add New Post /wp-admin/post-new.php1,568 ▲1423.54 ▲5.27690.17 ▲31.1239.62 ▼19.73
Media Library /wp-admin/upload.php1,560 ▲1634.78 ▲0.53115.73 ▲11.9682.56 ▲37.18

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_mo_oauth_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/login-with-azure/class-mo-oauth-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/login-with-azure/class-mo-oauth-widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
You can look at the official readme.txt

login-with-azure/mo_oauth_settings.php 85% from 13 tests

The main PHP script in "Login with Azure (Azure SSO)" version 1.5.3 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("login-with-azure.php" instead of "mo_oauth_settings.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected12,179 lines of code in 60 files:
LanguageFilesBlank linesComment linesLines of code
CSS10126575,857
PHP367001075,160
SVG200689
JavaScript114246447
JSON11026

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 258)
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity21.20
▷ Minimum class complexity1.00
▷ Maximum class complexity270.00
Average method complexity4.96
▷ Minimum method complexity1.00
▷ Maximum method complexity258.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods102
▷ Static methods3534.31%
▷ Public methods9391.18%
▷ Protected methods10.98%
▷ Private methods87.84%
Functions33
▷ Named functions33100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
34 PNG files occupy 0.38MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/partials/licensing/img/tick.png28.84KB12.74KB▼ 55.81%
images/miniorange.png0.44KB0.35KB▼ 18.61%
admin/partials/apps/images/miniorange.png4.18KB4.28KB0.00%
admin/partials/apps/images/microsoftTeams.png3.02KB1.96KB▼ 34.98%
admin/partials/addons/images/fsso.png12.49KB6.40KB▼ 48.75%