90% wc-delete-orders

Code Review | WC Delete all orders

WordPress plugin WC Delete all orders scored90%from 54 tests.

About plugin

  • Plugin page: wc-delete-orders
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-5.4.2
  • WordPress version: 6.3.1
  • First release: Oct 11, 2017
  • Latest release: Jun 25, 2020
  • Number of updates: 6
  • Update frequency: every 164.7 days
  • Top authors: Rynald0s (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

500+ active /7,401 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

An overview of server-side resources used by WC Delete all orders
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.38 ▼4.09
Dashboard /wp-admin3.32 ▼0.0349.02 ▼18.71
Posts /wp-admin/edit.php3.37 ▲0.0150.51 ▼0.65
Add New Post /wp-admin/post-new.php5.90 ▲0.0196.72 ▲0.49
Media Library /wp-admin/upload.php3.24 ▲0.0137.51 ▲0.12

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WC Delete all orders
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7913.67 ▼0.692.15 ▲0.0642.38 ▲1.03
Dashboard /wp-admin2,221 ▲184.83 ▼0.08108.53 ▼0.4942.51 ▼1.73
Posts /wp-admin/edit.php2,100 ▼32.05 ▲0.0540.47 ▼1.8835.61 ▼3.63
Add New Post /wp-admin/post-new.php1,545 ▼123.20 ▲0.19671.38 ▼24.7251.75 ▼10.08
Media Library /wp-admin/upload.php1,400 ▼04.28 ▲0.08102.97 ▼8.8743.94 ▼3.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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: delete orders, orders, bulk delete

wc-delete-orders/wc-delete-all-orders.php 92% from 13 tests

The main PHP file in "WC Delete all orders" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wc-delete-orders.php" instead of "wc-delete-all-orders.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
Success! There were no dangerous files found in this plugin67 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1203067

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin