83% search-by-sku-for-woocommerce

Code Review | Search by SKU for Woocommerce

WordPress plugin Search by SKU for Woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: search-by-sku-for...
  • Plugin version: 0.8.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.7.2
  • WordPress version: 6.3.1
  • First release: Jun 7, 2013
  • Latest release: Jul 16, 2021
  • Number of updates: 29
  • Update frequency: every 103.4 days
  • Top authors: mattsgarage (100%)

Code review

54 tests

User reviews

85 reviews

Install metrics

10,000+ active /123,419 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼13.49ms] Passed 4 tests

This is a short check of server-side resources used by Search by SKU for Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.31 ▲0.46
Dashboard /wp-admin3.33 ▲0.0346.86 ▼3.74
Posts /wp-admin/edit.php3.38 ▲0.0346.16 ▼3.12
Add New Post /wp-admin/post-new.php5.91 ▲0.0381.10 ▼34.76
Media Library /wp-admin/upload.php3.25 ▲0.0335.99 ▼12.35

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Search by SKU for Woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.41 ▼1.371.64 ▼0.4344.29 ▼3.10
Dashboard /wp-admin2,206 ▲244.86 ▼0.01100.20 ▼3.4839.26 ▼3.00
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0039.12 ▲3.5133.81 ▲0.06
Add New Post /wp-admin/post-new.php1,530 ▼1223.45 ▲5.21680.28 ▼0.2357.43 ▼14.02
Media Library /wp-admin/upload.php1,385 ▼34.21 ▲0.03110.05 ▲6.9645.79 ▲1.90

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

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)
Good news, no errors were detected

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
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/search-by-sku-for-woocommerce/wc-searchbysku-relevanssi-compat.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/search-by-sku-for-woocommerce/wc-searchbysku-widget-compat.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/search-by-sku-for-woocommerce/wc-searchbysku-register-settings.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: woocommerce, ecommerce, stock keeping unit, sku, e-commerce...

search-by-sku-for-woocommerce/woocommerce-searchbysku.php 77% from 13 tests

The primary PHP file in "Search by SKU for Woocommerce" version 0.8.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("search-by-sku-for-woocommerce.php" instead of "woocommerce-searchbysku.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 158 characters long)
  • Requires at least: The required version number must match the one declared in readme.txt ("3.1.0" instead of "3.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin199 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP55265199

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.73
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin