84% mw-auth

Code Review | MW Auth

WordPress plugin MW Auth scored84%from 54 tests.

About plugin

  • Plugin page: mw-auth
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.9.1
  • WordPress version: 6.3.1
  • First release: Apr 30, 2013
  • Latest release: May 31, 2014
  • Number of updates: 4
  • Update frequency: every 99.5 days
  • Top authors: inc2734 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /1,990 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.35ms] Passed 4 tests

Analyzing server-side resources used by MW Auth
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0145.76 ▲6.73
Dashboard /wp-admin3.32 ▼0.0251.70 ▼15.29
Posts /wp-admin/edit.php3.37 ▲0.0249.13 ▲0.26
Add New Post /wp-admin/post-new.php5.90 ▲0.0289.48 ▼15.87
Media Library /wp-admin/upload.php3.24 ▲0.0237.49 ▲1.51

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for MW Auth
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.461.75 ▲0.1244.39 ▲2.61
Dashboard /wp-admin2,189 ▲95.55 ▲0.0298.40 ▲5.3342.86 ▲2.61
Posts /wp-admin/edit.php2,100 ▼31.97 ▼0.0037.94 ▲2.4134.61 ▼0.28
Add New Post /wp-admin/post-new.php1,528 ▼722.95 ▲4.70659.71 ▲26.6147.15 ▼34.92
Media Library /wp-admin/upload.php1,397 ▼64.18 ▼0.06101.01 ▼0.7942.54 ▼2.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/mw-auth/mw-auth.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === mw-auth === )
  • Donate link: Invalid URI found ("")
The official readme.txt is a good inspiration

mw-auth/mw-auth.php Passed 13 tests

The main PHP script in "MW Auth" version 1.2 is automatically included on every request by WordPress
59 characters long description:
This plugin allows only users to authenticate to WordPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin75 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP185448
PO File151027

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin