84% woo-product-reorder

Code Review | Product Reorder for Woocommerce

WordPress plugin Product Reorder for Woocommerce scored 84% from 54 tests.

About plugin

  • Plugin page: woo-product-reorder
  • Plugin version: 1.2.5
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.9
  • WordPress version: 6.3.1
  • First release: Aug 22, 2019
  • Latest release: May 5, 2022
  • Number of updates: 15
  • Update frequency: every 65.8 days
  • Top authors: gangesh (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

600+ active / 3,425 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
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Product Reorder for Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0332.29 ▼8.18
Dashboard /wp-admin3.33 ▲0.0346.56 ▼6.86
Posts /wp-admin/edit.php3.38 ▲0.0349.23 ▲2.55
Add New Post /wp-admin/post-new.php5.91 ▲0.0396.94 ▲2.96
Media Library /wp-admin/upload.php3.25 ▲0.0239.87 ▲6.02

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Product Reorder for Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.25 ▼1.131.87 ▼0.2541.45 ▼8.12
Dashboard /wp-admin2,209 ▲215.86 ▲0.01105.77 ▼10.8842.08 ▼1.61
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0038.99 ▲2.7535.70 ▲1.21
Add New Post /wp-admin/post-new.php1,529 ▼518.30 ▼4.79634.01 ▼45.3263.70 ▲4.89
Media Library /wp-admin/upload.php1,391 ▲34.20 ▲0.0094.09 ▼13.6743.70 ▼8.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-product-reorder/index.php:17

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: woocommerce, product-order

woo-product-reorder/index.php 85% from 13 tests

The entry point to "Product Reorder for Woocommerce" version 1.2.5 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-product-reorder.php" instead of "index.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin442 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript15511205
PHP13618132
CSS1120105

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions10
▷ Named functions990.00%
▷ Anonymous functions110.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
PNG images were not found in this plugin