83% wc-rearrange-order-items

Code Review | Rearrange Order Items for WooCommerce

WordPress plugin Rearrange Order Items for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: wc-rearrange-orde...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.2
  • WordPress version: 6.3.1
  • First release: May 11, 2023
  • Latest release: May 11, 2023
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: ole1986 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /398 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Rearrange Order Items for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.60 ▲0.73
Dashboard /wp-admin3.31 ▼0.0344.76 ▼12.98
Posts /wp-admin/edit.php3.36 ▲0.0149.24 ▲1.82
Add New Post /wp-admin/post-new.php5.91 ▲0.0379.05 ▼9.29
Media Library /wp-admin/upload.php3.24 ▲0.0138.25 ▲1.17

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Rearrange Order Items for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.41 ▲0.111.65 ▲0.0244.77 ▲3.23
Dashboard /wp-admin2,194 ▲205.57 ▲0.0382.00 ▼4.8139.77 ▼0.47
Posts /wp-admin/edit.php2,102 ▲22.02 ▲0.0339.66 ▲2.3135.99 ▼0.13
Add New Post /wp-admin/post-new.php1,528 ▲223.31 ▼0.22677.86 ▲7.8450.16 ▼2.42
Media Library /wp-admin/upload.php1,402 ▲24.16 ▼0.10101.33 ▼12.5449.00 ▼0.31

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 did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wc-rearrange-order-items/wc-orderitem-rearrange.php

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: woocommerce, reorder, orders, wc, rearrange...

wc-rearrange-order-items/wc-orderitem-rearrange.php 77% from 13 tests

The primary PHP file in "Rearrange Order Items for WooCommerce" version 1.0.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Requires at least: Required version does not match the one declared in readme.txt ("3.1" instead of "3.0.0")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wc-rearrange-order-items.php" instead of "wc-orderitem-rearrange.php")

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
No dangerous file extensions were detected95 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1211357
JavaScript281038

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There are no PNG files in this plugin