84% justawesome-woocommerce-redirect

Code Review | JustAwesome WooCommerce Redirect

WordPress plugin JustAwesome WooCommerce Redirect scored84%from 54 tests.

About plugin

  • Plugin page: justawesome-wooco...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.0.3
  • WordPress version: 6.3.1
  • First release: Jan 30, 2019
  • Latest release: Jan 31, 2019
  • Number of updates: 12
  • Update frequency: every 0.1 days
  • Top authors: maG66 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /521 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.63ms] Passed 4 tests

Server-side resources used by JustAwesome WooCommerce Redirect
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.25 ▲4.07
Dashboard /wp-admin3.34 ▼0.0147.42 ▼19.36
Posts /wp-admin/edit.php3.39 ▲0.0353.15 ▼3.89
Add New Post /wp-admin/post-new.php5.92 ▲0.0396.57 ▼11.35
Media Library /wp-admin/upload.php3.26 ▲0.0338.84 ▲4.92

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for JustAwesome WooCommerce Redirect
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.35 ▼0.021.53 ▼0.1342.97 ▼1.11
Dashboard /wp-admin2,192 ▲125.63 ▲0.0692.24 ▼13.1539.11 ▼3.63
Posts /wp-admin/edit.php2,100 ▼32.01 ▲0.0441.49 ▲0.8237.12 ▲1.54
Add New Post /wp-admin/post-new.php1,526 ▼223.23 ▲0.28689.55 ▲23.0657.29 ▼2.35
Media Library /wp-admin/upload.php1,400 ▼34.15 ▼0.01123.33 ▲21.7850.60 ▲2.25

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/justawesome-woocommerce-redirect/justawesome-woocommerce-redirect.php:13

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

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: redirect, woocoomerce, forwarding, rewrite

justawesome-woocommerce-redirect/justawesome-woocommerce-redirect.php Passed 13 tests

The main file in "JustAwesome WooCommerce Redirect" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
65 characters long description:
JustAwesome WooCommerce Redirect Shop Page to Page/Product or URL

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin189 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1169189

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
justawesome.png9.84KB4.63KB▼ 52.93%