78% wt-woocommerce-wishlist

Code Review | Wishlist for WooCommerce

WordPress plugin Wishlist for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: wt-woocommerce-wi...
  • Plugin version: 2.0.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-6.4.1
  • WordPress version: 6.3.1
  • First release: Apr 13, 2018
  • Latest release: Nov 23, 2023
  • Number of updates: 52
  • Update frequency: every 39.4 days
  • Top authors: webtoffee (63.46%)markhf (38.46%)

Code review

54 tests

User reviews

5 reviews

Install metrics

400+ active /14,060 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Wishlist for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.55 ▼3.47
Dashboard /wp-admin3.31 ▲0.0046.17 ▼3.19
Posts /wp-admin/edit.php3.36 ▲0.0048.99 ▼0.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.47 ▼2.44
Media Library /wp-admin/upload.php3.23 ▲0.0034.67 ▲1.18

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 72 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wishlist for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲1514.01 ▼0.331.76 ▲0.0136.71 ▼4.97
Dashboard /wp-admin2,198 ▲245.62 ▼0.0289.64 ▼4.1941.83 ▼1.94
Posts /wp-admin/edit.php2,100 ▼31.96 ▼0.0639.85 ▼3.0436.14 ▼5.53
Add New Post /wp-admin/post-new.php1,526 ▼823.13 ▲0.23611.99 ▲7.6354.74 ▲0.06
Media Library /wp-admin/upload.php1,400 ▼34.15 ▼0.0297.58 ▼2.2739.83 ▼2.97

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please fix the following
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/wt-woocommerce-wishlist/admin/views/wishlist-button-style-settings-page.php
    • > /wp-content/plugins/wt-woocommerce-wishlist/admin/partials/wishlist-webtoffee-admin-display.php
    • > /wp-content/plugins/wt-woocommerce-wishlist/admin/views/class-wishlist-settings.php
    • > /wp-content/plugins/wt-woocommerce-wishlist/admin/views/wishlist-table-settings-page.php
    • > /wp-content/plugins/wt-woocommerce-wishlist/admin/views/wishlist-popular-products-page.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wt-woocommerce-wishlist/includes/class-wt-wishlist-uninstall-feedback.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: wishlist, woocommerce wishlist, bookmark products, wishlist for woocommerce, save for later

wt-woocommerce-wishlist/wishlist-webtoffee.php 85% from 13 tests

The main file in "Wishlist for WooCommerce" v. 2.0.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0" instead of "2.7")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wt-woocommerce-wishlist.php" instead of "wishlist-webtoffee.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin37,847 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
SVG70034,897
PHP255012222,025
CSS23817419
JavaScript25165264
PO File2102108242

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity13.86
▷ Minimum class complexity1.00
▷ Maximum class complexity45.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods83
▷ Static methods1113.25%
▷ Public methods7387.95%
▷ Protected methods11.20%
▷ Private methods910.84%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants4
▷ Global constants4100.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
10 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/ellipse.png0.43KB0.34KB▼ 21.36%
public/images/icon_favourite.png0.60KB0.47KB▼ 21.31%
public/images/delete_icon.png0.34KB0.24KB▼ 29.06%
admin/img/webtoffee_banner.png6.35KB3.20KB▼ 49.56%
public/images/unfavourite.png0.44KB0.32KB▼ 28.22%