90% wcpscr-product-search-category-redirect

Code Review | Product Search Category Redirect

WordPress plugin Product Search Category Redirect scored90%from 54 tests.

About plugin

  • Plugin page: wcpscr-product-se...
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9.0-6.3.1
  • WordPress version: 6.3.1
  • First release: May 25, 2021
  • Latest release: Sep 19, 2023
  • Number of updates: 11
  • Update frequency: every 77.1 days
  • Top authors: ninetyninew (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /734 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: ▼4.54ms] Passed 4 tests

This is a short check of server-side resources used by Product Search Category Redirect
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.21 ▼4.75
Dashboard /wp-admin3.32 ▲0.0147.69 ▼2.26
Posts /wp-admin/edit.php3.37 ▲0.0144.03 ▼2.06
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.79 ▼9.10
Media Library /wp-admin/upload.php3.24 ▲0.0136.33 ▼1.63

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Product Search Category Redirect
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6113.74 ▼1.011.77 ▼0.2042.75 ▲0.08
Dashboard /wp-admin2,210 ▲255.76 ▼0.10104.60 ▼14.9541.07 ▼5.50
Posts /wp-admin/edit.php2,099 ▲102.06 ▲0.0737.61 ▼0.5934.89 ▼0.06
Add New Post /wp-admin/post-new.php1,554 ▲1918.33 ▼4.90614.75 ▼1.9373.33 ▲24.93
Media Library /wp-admin/upload.php1,395 ▲74.33 ▲0.1499.34 ▼7.7842.82 ▲1.56

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

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 Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: category redirects, product search, product redirects, search redirects

wcpscr-product-search-category-redirect/wcpscr-product-search-category-redirect.php Passed 13 tests

The main file in "Product Search Category Redirect" v. 1.2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
29 characters long description:
WooCommerce Extension by 99w.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin114 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1602564
XML16339
JSON10011

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.71
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%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin