83% search-by-product-tags-for-woocommerce

Code Review | Search by Product Tag for Woocommerce

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

About plugin

  • Plugin page: search-by-product...
  • Plugin version: 0.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8.1
  • WordPress version: 6.3.1
  • First release: Mar 14, 2014
  • Latest release: Mar 20, 2014
  • Number of updates: 5
  • Update frequency: every 38.4 days
  • Top authors: mattsgarage (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

500+ active /9,338 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

This is a short check of server-side resources used by Search by Product Tag for Woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.94 ▲1.80
Dashboard /wp-admin3.31 ▼0.0346.92 ▼10.33
Posts /wp-admin/edit.php3.37 ▲0.0142.86 ▼2.72
Add New Post /wp-admin/post-new.php5.90 ▲0.0178.88 ▼24.62
Media Library /wp-admin/upload.php3.24 ▲0.0135.74 ▲0.95

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Search by Product Tag for Woocommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.26 ▼1.024.53 ▲2.7639.63 ▼3.42
Dashboard /wp-admin2,206 ▲144.85 ▼0.09111.42 ▲1.4843.84 ▲1.98
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0235.53 ▼6.2032.05 ▼3.26
Add New Post /wp-admin/post-new.php1,533 ▲1223.06 ▲0.01621.62 ▼44.1451.00 ▼0.79
Media Library /wp-admin/upload.php1,391 ▼04.18 ▼0.0198.28 ▲0.9043.11 ▲0.10

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× 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-product-tags-for-woocommerce/woocommerce-searchbyproducttag.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt is a good inspiration

search-by-product-tags-for-woocommerce/woocommerce-searchbyproducttag.php 85% from 13 tests

This is the main PHP file of "Search by Product Tag for Woocommerce" version 0.3.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 167 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("search-by-product-tags-for-woocommerce.php" instead of "woocommerce-searchbyproducttag.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected75 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1243075

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected