84% woo-search-by-product-sku

Code Review | WooCommerce Search By SKU

WordPress plugin WooCommerce Search By SKU scored84%from 54 tests.

About plugin

  • Plugin page: woo-search-by-pro...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.7.4
  • WordPress version: 6.3.1
  • First release: Apr 24, 2017
  • Latest release: Apr 24, 2017
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: claytonkreisel (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active /10,274 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 successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by WooCommerce Search By SKU
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.74 ▼14.85
Dashboard /wp-admin3.32 ▼0.0251.33 ▼15.77
Posts /wp-admin/edit.php3.37 ▲0.0250.17 ▲3.11
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.81 ▼1.68
Media Library /wp-admin/upload.php3.24 ▲0.0236.62 ▲0.20

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Search By SKU
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.17 ▼0.202.00 ▼0.1947.54 ▲3.81
Dashboard /wp-admin2,198 ▲215.55 ▼0.1199.39 ▼0.7443.05 ▲0.71
Posts /wp-admin/edit.php2,100 ▲31.96 ▼0.0536.83 ▲2.6934.80 ▼2.20
Add New Post /wp-admin/post-new.php1,526 ▼523.66 ▲0.60633.44 ▼63.6245.67 ▼13.55
Media Library /wp-admin/upload.php1,400 ▼04.28 ▲0.03107.16 ▼8.7545.34 ▼3.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/woo-search-by-product-sku/tr-wc-search-by-sku.php:83

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
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
4 plugin tags: product number, search, sku, woocommerce

woo-search-by-product-sku/tr-wc-search-by-sku.php 92% from 13 tests

The entry point to "WooCommerce Search By SKU" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-search-by-product-sku.php" instead of "tr-wc-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
Success! There were no dangerous files found in this plugin63 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1222563

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
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%
Functions3
▷ Named functions3100.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