89% woo-login-redirect

Code Review | WooCommerce Login Redirect

WordPress plugin WooCommerce Login Redirect scored89%from 54 tests.

About plugin

  • Plugin page: woo-login-redirect
  • Plugin version: 2.2.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 7, 2015
  • Latest release: Apr 14, 2020
  • Number of updates: 60
  • Update frequency: every 28.0 days
  • Top authors: nazmulhassann20 (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

3,000+ active /65,373 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.29MB] [CPU: ▼21.89ms] Passed 4 tests

An overview of server-side resources used by WooCommerce Login Redirect
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.91 ▼0.5620.83 ▼22.60
Dashboard /wp-admin3.20 ▼0.1536.05 ▼25.67
Posts /wp-admin/edit.php3.28 ▼0.0837.85 ▼20.99
Add New Post /wp-admin/post-new.php5.52 ▼0.3783.51 ▼18.29
Media Library /wp-admin/upload.php3.22 ▼0.0126.35 ▼9.93

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 8 new options
New WordPress options
wlr_version
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
wlr_installed
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Login Redirect
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.21 ▼0.151.69 ▼0.0642.50 ▼3.67
Dashboard /wp-admin2,214 ▲345.65 ▼0.0085.96 ▼3.3939.11 ▼2.72
Posts /wp-admin/edit.php2,113 ▲131.97 ▲0.0136.98 ▼1.5435.82 ▲2.66
Add New Post /wp-admin/post-new.php1,539 ▲1123.25 ▲0.29654.94 ▼34.7454.85 ▲1.75
Media Library /wp-admin/upload.php1,416 ▲164.18 ▼0.0194.20 ▼19.4041.78 ▼6.21

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-posts
    • wlr_version
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • wlr_installed

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention: You can take inspiration from this readme.txt

woo-login-redirect/woo-login-redirect.php 92% from 13 tests

The principal PHP file in "WooCommerce Login Redirect" v. 2.2.4 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected374 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP6134201365
JavaScript4418
CSS2121

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.44
Average class complexity11.83
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes116.67%
Methods43
▷ Static methods818.60%
▷ Public methods4195.35%
▷ Protected methods00.00%
▷ Private methods24.65%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin