89% regenerate-product-lookup-table-for-woocommerce

Code Review | Regenerate product lookup table for WooCommerce

WordPress plugin Regenerate product lookup table for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: regenerate-produc...
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Jan 30, 2021
  • Latest release: Aug 13, 2023
  • Number of updates: 9
  • Update frequency: every 102.8 days
  • Top authors: metalfreek (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /2,318 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.02MB] [CPU: ▼1.76ms] Passed 4 tests

Analyzing server-side resources used by Regenerate product lookup table for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.23 ▲0.23
Dashboard /wp-admin3.32 ▲0.0245.57 ▼3.90
Posts /wp-admin/edit.php3.37 ▲0.0246.93 ▲4.45
Add New Post /wp-admin/post-new.php5.90 ▲0.0286.28 ▼7.83
Media Library /wp-admin/upload.php3.25 ▲0.0235.51 ▲4.47
Woocommerce regenerate product lookup table /wp-admin/options-general.php?page=smnwcrpl3.2430.05

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
smnwcrpl_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Regenerate product lookup table for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6613.18 ▼1.221.63 ▼0.3441.54 ▼4.29
Dashboard /wp-admin2,229 ▲414.83 ▼0.04107.57 ▼7.3344.30 ▼6.71
Posts /wp-admin/edit.php2,108 ▲162.04 ▲0.0437.23 ▼2.4333.87 ▲0.51
Add New Post /wp-admin/post-new.php1,551 ▲3723.10 ▲5.46684.72 ▼13.7861.12 ▲8.35
Media Library /wp-admin/upload.php1,414 ▲264.23 ▲0.0096.61 ▼19.4343.21 ▼5.94
Woocommerce regenerate product lookup table /wp-admin/options-general.php?page=smnwcrpl8242.0627.6429.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: woo, woo commerce

regenerate-product-lookup-table-for-woocommerce/wc-regenerate-product-lookup.php 85% from 13 tests

The primary PHP file in "Regenerate product lookup table for WooCommerce" version 1.0.3 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("regenerate-product-lookup-table-for-woocommerce.php" instead of "wc-regenerate-product-lookup.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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 plugin190 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP98789190

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions15
▷ Named functions15100.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
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.PNG45.39KB23.19KB▼ 48.91%