90% search-order-by-product-sku-for-woocommerce

Code Review | Search order by product SKU for WooCommerce

WordPress plugin Search order by product SKU for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: search-order-by-p...
  • Plugin version: 0.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2.2
  • WordPress version: 6.3.1
  • First release: Feb 4, 2017
  • Latest release: Jun 9, 2023
  • Number of updates: 21
  • Update frequency: every 110.2 days
  • Top authors: labdav (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /1,445 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼0.73ms] Passed 4 tests

Server-side resources used by Search order by product SKU for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0242.36 ▲8.39
Dashboard /wp-admin3.33 ▼0.0243.56 ▼16.75
Posts /wp-admin/edit.php3.38 ▲0.0246.51 ▲1.01
Add New Post /wp-admin/post-new.php5.91 ▲0.0296.99 ▲9.22
Media Library /wp-admin/upload.php3.25 ▲0.0235.62 ▲4.42

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Search order by product SKU for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.31 ▼0.311.61 ▲0.0137.49 ▲0.51
Dashboard /wp-admin2,202 ▲245.62 ▲0.0389.33 ▼28.8742.85 ▼4.47
Posts /wp-admin/edit.php2,107 ▲71.96 ▲0.0238.03 ▲2.6936.89 ▲5.00
Add New Post /wp-admin/post-new.php1,542 ▲1418.09 ▼4.86615.94 ▼55.9062.58 ▲12.73
Media Library /wp-admin/upload.php1,407 ▲104.20 ▼0.0996.32 ▼3.8343.95 ▲2.43

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: woocommerce, ldav, product sku, order search

search-order-by-product-sku-for-woocommerce/search-by-sku.php 92% from 13 tests

The entry point to "Search order by product SKU for WooCommerce" version 0.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("search-order-by-product-sku-for-woocommerce.php" instead of "search-by-sku.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected118 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1151789
PO File17729

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin