84% wishlist-and-compare

Code Review | Wishlist and Compare for WooCommerce

WordPress plugin Wishlist and Compare for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wishlist-and-compare
  • Plugin version: 1.3.1
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Dec 1, 2020
  • Latest release: Sep 1, 2023
  • Number of updates: 42
  • Update frequency: every 23.9 days
  • Top authors: ThemeHigh (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /3,839 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼12.32ms] Passed 4 tests

Server-side resources used by Wishlist and Compare for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0836.23 ▼4.57
Dashboard /wp-admin3.38 ▲0.0444.10 ▼10.42
Posts /wp-admin/edit.php3.50 ▲0.1442.99 ▼8.70
Add New Post /wp-admin/post-new.php5.96 ▲0.0881.48 ▼25.58
Media Library /wp-admin/upload.php3.31 ▲0.0835.94 ▼0.22

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wishlist and Compare for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.24 ▼1.341.75 ▼0.0040.37 ▼4.33
Dashboard /wp-admin2,203 ▲125.90 ▲0.04106.71 ▲6.6738.79 ▼2.96
Posts /wp-admin/edit.php2,089 ▼32.06 ▲0.0735.22 ▼6.1235.16 ▼0.59
Add New Post /wp-admin/post-new.php1,533 ▲1923.20 ▲5.68657.32 ▲12.2261.71 ▲9.84
Media Library /wp-admin/upload.php1,388 ▼34.20 ▼0.0696.70 ▼10.2342.19 ▼5.41

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 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
Please fix the following
  • 14× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_id() on null in wp-content/plugins/wishlist-and-compare/templates/thwwac-addtocompare.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'THWWC\\base\\THWWC_Base_Controller' not found in wp-content/plugins/wishlist-and-compare/inc/base/class-thwwc-enqueue.php:24
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_type() on null in wp-content/plugins/wishlist-and-compare/templates/thwwac-addtowishlist-single.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wishlist-and-compare/templates/thwwac-wishlist.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'THWWC\\base\\THWWC_Utils' not found in wp-content/plugins/wishlist-and-compare/templates/thwwac-comparepopup.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'THWWC\\base\\THWWC_Base_Controller' not found in wp-content/plugins/wishlist-and-compare/inc/thpublic/class-thwwc-public-wishlist.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'THWWC\\base\\THWWC_Base_Controller' not found in wp-content/plugins/wishlist-and-compare/inc/thpublic/class-thwwc-public-compare.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'THWWC\\base\\THWWC_Base_Controller' not found in wp-content/plugins/wishlist-and-compare/inc/thpublic/class-thwwc-public-wishlist-counter.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'THWWC\\base\\THWWC_Base_Controller' not found in wp-content/plugins/wishlist-and-compare/inc/thpublic/class-thwwc-public-wishlist-page.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'THWWC\\base\\THWWC_Utils' not found in wp-content/plugins/wishlist-and-compare/templates/thwwac-wishlist-popups.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #13 (Button above thumbnail.)
The official readme.txt is a good inspiration

wishlist-and-compare/wishlist-and-compare.php 92% from 13 tests

The primary PHP file in "Wishlist and Compare for WooCommerce" version 1.3.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.2" instead of "6.0")

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
Everything looks great! No dangerous files found in this plugin9,026 lines of code in 76 files:
LanguageFilesBlank linesComment linesLines of code
PHP335701,1584,942
CSS523341,913
JavaScript987511,577
SVG27011576
JSON20018

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.67
Average class complexity55.76
▷ Minimum class complexity1.00
▷ Maximum class complexity236.00
Average method complexity7.25
▷ Minimum method complexity1.00
▷ Maximum method complexity70.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes14.76%
Methods187
▷ Static methods3016.04%
▷ Public methods14979.68%
▷ Protected methods10.53%
▷ Private methods3719.79%
Functions8
▷ Named functions562.50%
▷ Anonymous functions337.50%
Constants16
▷ Global constants743.75%
▷ Class constants956.25%
▷ Public constants9100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/libs/icons/review-left.png8.22KB4.15KB▼ 49.47%