84% wishsuite

Code Review | WishSuite - Wishlist for WooCommerce

WordPress plugin WishSuite - Wishlist for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wishsuite
  • Plugin version: 1.3.7
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Feb 17, 2021
  • Latest release: Aug 1, 2023
  • Number of updates: 47
  • Update frequency: every 19.0 days
  • Top authors: htplugins (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active /27,459 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.79MB] [CPU: ▲2.47ms] 75% from 4 tests

An overview of server-side resources used by WishSuite - Wishlist for WooCommerce
The following require your attention
  • CPU: Try to keep total CPU usage under 500.00ms (currently 1,332.13ms on /wp-admin/admin.php?page=wishsuite_recommendations)
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.3942.47 ▲3.17
Dashboard /wp-admin4.24 ▲0.9464.50 ▲15.95
Posts /wp-admin/edit.php4.29 ▲0.9453.62 ▲8.47
Add New Post /wp-admin/post-new.php6.82 ▲0.9388.12 ▼10.42
Media Library /wp-admin/upload.php4.14 ▲0.9141.56 ▲8.65
Recommendations /wp-admin/admin.php?page=wishsuite_recommendations8.551,332.13

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 71 new files
Database: 1 new table, 12 new options
New tables
wp_wishsuite_list
New WordPress options
db_upgraded
wishsuite_version
wishsuite_table_settings_tabs
widget_recent-posts
wishsuite_settings_tabs
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
wishsuite_installed
wishsuite_style_settings_tabs
...

Browser metrics Passed 4 tests

A check of browser resources used by WishSuite - Wishlist for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,978 ▲21715.03 ▲0.371.70 ▲0.0942.08 ▲2.04
Dashboard /wp-admin2,387 ▲2096.34 ▲0.68120.58 ▲20.6542.62 ▲0.52
Posts /wp-admin/edit.php2,323 ▲2233.76 ▲1.8047.06 ▲10.2331.09 ▼2.24
Add New Post /wp-admin/post-new.php1,571 ▲4523.58 ▲0.31624.45 ▼23.6834.74 ▼17.70
Media Library /wp-admin/upload.php1,454 ▲514.33 ▲0.0779.89 ▼17.6341.54 ▼5.92
Recommendations /wp-admin/admin.php?page=wishsuite_recommendations3,1083.4445.9785.15
Settings /wp-admin/admin.php?page=wishsuite#settings3,3424.43130.4844.13

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • wishsuite_installed
    • db_upgraded
    • wishsuite_general_tabs
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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 following issues need your attention
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wishsuite/includes/templates/wishsuite-button-exist.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wishsuite/includes/templates/wishsuite-table.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wishsuite/includes/templates/wishsuite-count.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wishsuite/includes/templates/wishsuite-button-add.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

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
5 plugin tags: product wishlist, woocommerce wishlist, wishlist, wishsuite, woocommerce

wishsuite/wishsuite.php Passed 13 tests

The entry point to "WishSuite - Wishlist for WooCommerce" version 1.3.7 is a PHP file that has certain tags in its header comment area
35 characters long description:
WooCommerce Product wishlist plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin4,844 lines of code in 50 files:
LanguageFilesBlank linesComment linesLines of code
PHP319761,0243,732
CSS25020625
JavaScript39252392
SVG130290
JSON1005

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity23.61
▷ Minimum class complexity1.00
▷ Maximum class complexity89.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes15.56%
Methods172
▷ Static methods2715.70%
▷ Public methods16193.60%
▷ Protected methods10.58%
▷ Private methods105.81%
Functions23
▷ Named functions1982.61%
▷ Anonymous functions417.39%
Constants10
▷ Global constants770.00%
▷ Class constants330.00%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
18 PNG files occupy 0.12MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/extensions/ht-slider-addons-pro.png6.41KB4.35KB▼ 32.23%
(invalid) assets/images/extensions/ht-menu.png2.85KB0.00KB▼ 100.00%
assets/images/extensions/woolentor-addons-pro.png3.20KB1.69KB▼ 47.09%
(invalid) assets/images/extensions/wp-plugin-manager-pro.png13.31KB0.00KB▼ 100.00%
assets/images/extensions/just-tables-pro.png1.02KB1.05KB0.00%