83% 404-to-301-for-woo-products-url

Code Review | 404 to 301 for products url on WooCommerce

WordPress plugin 404 to 301 for products url on WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: 404-to-301-for-wo...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0.1
  • WordPress version: 6.3.1
  • First release: Aug 26, 2022
  • Latest release: Aug 26, 2022
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: imranshuvo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /191 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.00MB] [CPU: ▼6.26ms] Passed 4 tests

This is a short check of server-side resources used by 404 to 301 for products url on WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.13 ▼6.63
Dashboard /wp-admin3.31 ▲0.0046.86 ▼3.45
Posts /wp-admin/edit.php3.36 ▲0.0045.06 ▼3.29
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.20 ▼11.65
Media Library /wp-admin/upload.php3.23 ▲0.0032.49 ▼1.77

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

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

Browser metrics Passed 4 tests

A check of browser resources used by 404 to 301 for products url on WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.58 ▼0.801.61 ▼0.6342.29 ▼4.83
Dashboard /wp-admin2,209 ▲215.85 ▲0.9394.50 ▼21.6139.44 ▼6.34
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0433.24 ▼3.6835.88 ▼0.56
Add New Post /wp-admin/post-new.php1,533 ▼023.08 ▲0.28674.70 ▲9.0471.96 ▲17.88
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.0292.75 ▼21.5040.54 ▼7.12

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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 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_action() in wp-content/plugins/404-to-301-for-woo-products-url/9amdev-404handler.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
No tags were found

404-to-301-for-woo-products-url/9amdev-404handler.php 77% from 13 tests

The principal PHP file in "404 to 301 for products url on WooCommerce" v. 1.0.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 192 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("404-to-301-for-woo-products-url.php" instead of "9amdev-404handler.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected128 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15735128

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.61
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin