84% rearrange-woocommerce-products

Code Review | Rearrange Woocommerce Products

WordPress plugin Rearrange Woocommerce Products scored84%from 54 tests.

About plugin

  • Plugin page: rearrange-woocomm...
  • Plugin version: 4.2.0
  • PHP compatiblity: 7.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4
  • WordPress version: 6.3.1
  • First release: Nov 22, 2017
  • Latest release: Nov 8, 2023
  • Number of updates: 64
  • Update frequency: every 34.0 days
  • Top authors: aslamdoctor (100%)

Code review

54 tests

User reviews

44 reviews

Install metrics

10,000+ active /304,889 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.70ms] Passed 4 tests

Analyzing server-side resources used by Rearrange Woocommerce Products
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.38 ▲0.07
Dashboard /wp-admin3.31 ▲0.0045.52 ▼2.26
Posts /wp-admin/edit.php3.36 ▲0.0043.87 ▼2.56
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.31 ▼10.03
Media Library /wp-admin/upload.php3.23 ▲0.0035.83 ▲5.32
Troubleshooting /wp-admin/admin.php?page=rwpp-troubleshooting-page3.0124.58
Rearrange Products /wp-admin/admin.php?page=rwpp-page3.0124.37
Sort by Categories /wp-admin/admin.php?page=rwpp-sortby-categories-page3.0121.71

Server storage [IO: ▲0.43MB] [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: 40 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Rearrange Woocommerce Products
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.35 ▲0.131.69 ▼0.0743.22 ▼0.50
Dashboard /wp-admin2,198 ▲185.61 ▼0.0793.87 ▲1.1742.60 ▼3.28
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0736.21 ▲0.1433.08 ▼2.76
Add New Post /wp-admin/post-new.php1,526 ▼023.62 ▲0.11677.79 ▲1.9350.77 ▲1.00
Media Library /wp-admin/upload.php1,400 ▼04.22 ▲0.03106.31 ▼2.3246.92 ▲1.71
Troubleshooting /wp-admin/admin.php?page=rwpp-troubleshooting-page280.410.093.87
Rearrange Products /wp-admin/admin.php?page=rwpp-page280.410.093.33
Sort by Categories /wp-admin/admin.php?page=rwpp-sortby-categories-page280.410.103.96

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 detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=rwpp-troubleshooting-page
    • > Network (severe)
    wp-admin/admin.php?page=rwpp-troubleshooting-page - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=rwpp-page
    • > Network (severe)
    wp-admin/admin.php?page=rwpp-page - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=rwpp-sortby-categories-page
    • > Network (severe)
    wp-admin/admin.php?page=rwpp-sortby-categories-page - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #5 (Shortcut link under Categories section to sort by categories) image not found
The official readme.txt is a good inspiration

rearrange-woocommerce-products/rearrange-woocommerce-products.php Passed 13 tests

The main PHP file in "Rearrange Woocommerce Products" ver. 4.2.0 adds more information about the plugin and also serves as the entry point for this plugin
76 characters long description:
a WordPress plugin to Rearrange Woocommerce Products listed on the Shop page

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin4,607 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript16493113,151
PO File10330360856
PHP11109162494
CSS131102
JSON1004

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity53.00
▷ Minimum class complexity53.00
▷ Maximum class complexity53.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods22
▷ Static methods29.09%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/icon-tea.png3.30KB2.03KB▼ 38.52%