84% woo-user-redirect

Code Review | woo user redirect

WordPress plugin woo user redirect scored84%from 54 tests.

About plugin

  • Plugin page: woo-user-redirect
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.1
  • WordPress version: 6.3.1
  • First release: Apr 6, 2016
  • Latest release: Feb 28, 2019
  • Number of updates: 8
  • Update frequency: every 132.4 days
  • Top authors: babanynr (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /1,466 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.33ms] Passed 4 tests

A check of server-side resources used by woo user redirect
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.71 ▲0.70
Dashboard /wp-admin3.33 ▲0.0342.51 ▼5.88
Posts /wp-admin/edit.php3.38 ▲0.0345.76 ▼1.54
Add New Post /wp-admin/post-new.php5.91 ▲0.0380.98 ▼16.75
Media Library /wp-admin/upload.php3.26 ▲0.0334.30 ▼1.16

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

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

Browser metrics Passed 4 tests

A check of browser resources used by woo user redirect
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.29 ▼1.011.72 ▼0.0238.68 ▼2.88
Dashboard /wp-admin2,203 ▲125.82 ▲0.9798.36 ▼9.9439.33 ▼1.07
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0338.09 ▲0.9935.98 ▼0.17
Add New Post /wp-admin/post-new.php1,533 ▲1923.08 ▲5.30661.98 ▼29.9950.22 ▼10.37
Media Library /wp-admin/upload.php1,385 ▼34.23 ▲0.0299.96 ▼10.0341.42 ▼4.11

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
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/woo-user-redirect/woo-user-redirect.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: user redirect, user redirect for woocommerce, user restriction, custom redirect, woo user redirect

woo-user-redirect/woo-user-redirect.php Passed 13 tests

This is the main PHP file of "woo user redirect" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
116 characters long description:
Woo user redirect is a addon for woocommerce which will redirect restricted user to a custom page based on User Role

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected186 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12353186

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods7100.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin