10% wp-auth

Code Review | Wp Auth

WordPress plugin Wp Auth scored10%from 54 tests.

About plugin

  • Plugin page: wp-auth
  • Plugin version: 1...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4
  • WordPress version: 6.3.1
  • First release: Oct 14, 2012
  • Latest release: Oct 15, 2012
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: ivansf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /7,239 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/wp-auth/wp-auth.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; WpAuth has a deprecated constructor

Server metrics [RAM: ▼1.83MB] [CPU: ▼53.80ms] Passed 4 tests

Analyzing server-side resources used by Wp Auth
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.16 ▼1.304.20 ▼37.73
Dashboard /wp-admin2.18 ▼1.125.75 ▼47.34
Posts /wp-admin/edit.php2.18 ▼1.176.32 ▼41.60
Add New Post /wp-admin/post-new.php2.18 ▼3.716.10 ▼88.54
Media Library /wp-admin/upload.php2.18 ▼1.056.54 ▼27.82

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_wp_auth_widget
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Wp Auth: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲11113.54 ▼0.851.75 ▼0.0238.45 ▼7.27
Dashboard /wp-admin2,223 ▲325.82 ▼0.08109.61 ▲4.7472.32 ▲25.80
Posts /wp-admin/edit.php2,109 ▲231.97 ▲0.0037.81 ▲1.9931.65 ▼5.80
Add New Post /wp-admin/post-new.php1,682 ▲14921.99 ▼1.19684.75 ▲1.2943.00 ▼19.79
Media Library /wp-admin/upload.php1,408 ▲234.12 ▼0.08104.18 ▲0.5245.82 ▲4.49

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/wp-auth/wp-auth.php+11
    Methods with the same name as their class will not be constructors in a future version of PHP; WpAuth has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_wp_auth_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/wp-auth/view-auth-options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-auth/wp-auth.php:499
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-auth/wp-auth-widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Donate link: Please fix this invalid url: ""
You can look at the official readme.txt

wp-auth/wp-auth.php 92% from 13 tests

The primary PHP file in "Wp Auth" version 1... is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Version: Use periods and digits only for your plugin's version number (ex. "1.0.3" instead of "1...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin631 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP311058501
CSS141130

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity21.50
▷ Minimum class complexity3.00
▷ Maximum class complexity40.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/ico-unlocked.png3.22KB0.52KB▼ 83.96%