83% wc-search-orders-by-product

Code Review | WC Search Orders By Product

WordPress plugin WC Search Orders By Product scored83%from 54 tests.

About plugin

  • Plugin page: wc-search-orders-...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3
  • WordPress version: 6.3.1
  • First release: Aug 11, 2017
  • Latest release: Aug 24, 2023
  • Number of updates: 42
  • Update frequency: every 52.5 days
  • Top authors: akshayaswaroop (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /12,357 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.02MB] [CPU: ▼12.38ms] Passed 4 tests

A check of server-side resources used by WC Search Orders By Product
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0343.77 ▲0.29
Dashboard /wp-admin45.15 ▲0.018,609,334.96 ▲8,406.98
Posts /wp-admin/edit.php3.31 ▼0.0936.01 ▼23.31
Add New Post /wp-admin/post-new.php6.05 ▲0.1288.09 ▼30.00
Media Library /wp-admin/upload.php3.40 ▲0.1240.57 ▲3.50

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
recovery_mode_email_last_sent
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WC Search Orders By Product
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,857 ▲9614.06 ▼0.661.73 ▲0.1045.18 ▼0.70
Dashboard /wp-admin2,248 ▲795.57 ▼0.1486.53 ▼23.6181.80 ▲35.01
Posts /wp-admin/edit.php45 ▼2,0550.42 ▼1.620.11 ▼41.9211.40 ▼24.66
Add New Post /wp-admin/post-new.php1,593 ▲6523.07 ▼0.11654.56 ▼1.3855.47 ▼6.50
Media Library /wp-admin/upload.php1,462 ▲654.18 ▼0.00103.70 ▲2.6373.31 ▲30.60

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • recovery_mode_email_last_sent
    • db_upgraded

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wc-search-orders-by-product/templates/admin/settings/settings-form-submit.php
    • > /wp-content/plugins/wc-search-orders-by-product/templates/admin/settings/sidebar-support.php
    • > /wp-content/plugins/wc-search-orders-by-product/templates/admin/settings/settings-form.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid url: "paypal.me/AKSHAYASWAROOP"
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

wc-search-orders-by-product/wc-search-orders-by-product.php 92% from 13 tests

"WC Search Orders By Product" version 2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 145 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected1,959 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
CSS3178117829
PHP9203318781
SVG705202
PO File1293290
JavaScript211057

PHP code Passed 2 tests

An short overview of 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.33
Average class complexity15.20
▷ Minimum class complexity7.00
▷ Maximum class complexity33.00
Average method complexity3.09
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods34
▷ Static methods1132.35%
▷ Public methods2470.59%
▷ Protected methods12.94%
▷ Private methods926.47%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/images/control-panel-icon.png2.55KB1.75KB▼ 31.63%
assets/admin/images/wp-heka-menu-icon-22.png0.51KB0.34KB▼ 32.76%