90% woocommerce-single-product-search-redirect

Code Review | Woocommerce Single Product Search Redirect

WordPress plugin Woocommerce Single Product Search Redirect scored 90% from 54 tests.

About plugin

  • Plugin page: woocommerce-singl...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.6.1
  • WordPress version: 6.3.1
  • First release: Oct 30, 2013
  • Latest release: Oct 18, 2016
  • Number of updates: 7
  • Update frequency: every 154.9 days
  • Top authors: patelprashant8490 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active / 2,965 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Woocommerce Single Product Search Redirect
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0133.34 ▼8.30
Dashboard /wp-admin3.31 ▲0.0044.56 ▼11.05
Posts /wp-admin/edit.php3.36 ▲0.0045.20 ▼2.39
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.36 ▲3.93
Media Library /wp-admin/upload.php3.23 ▲0.0030.69 ▼5.07

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

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

Browser metrics Passed 4 tests

Woocommerce Single Product Search Redirect: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.27 ▼1.371.79 ▲0.0439.88 ▼2.46
Dashboard /wp-admin2,203 ▲185.83 ▲0.9495.36 ▼22.5837.03 ▼9.28
Posts /wp-admin/edit.php2,086 ▲152.17 ▲0.1233.75 ▼2.8335.33 ▼0.61
Add New Post /wp-admin/post-new.php1,517 ▲317.66 ▼0.06589.06 ▼90.9653.85 ▼3.10
Media Library /wp-admin/upload.php1,388 ▼04.22 ▲0.0193.29 ▼9.0740.35 ▼6.85

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Donate link: Please fix this invalid url: ""
Please take inspiration from this readme.txt

woocommerce-single-product-search-redirect/woocommerce-single-product-search-redirect.php Passed 13 tests

The main PHP file in "Woocommerce Single Product Search Redirect" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
97 characters long description:
Manage yourself whether to redirect on product page or not if search query returns only 1 search.

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
Everything looks great! No dangerous files found in this plugin48 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2152048

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin