77% wishlist-for-woocommerce

Code Review | Wishlist for Woocommerce

WordPress plugin Wishlist for Woocommerce scored77%from 54 tests.

About plugin

  • Plugin page: wishlist-for-wooc...
  • Plugin version: 1.4.7
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-5.3
  • WordPress version: 6.3.1
  • First release: Sep 21, 2015
  • Latest release: Nov 19, 2019
  • Number of updates: 113
  • Update frequency: every 13.5 days
  • Top authors: phoeniixx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /11,618 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.05MB] [CPU: ▼2.89ms] Passed 4 tests

Analyzing server-side resources used by Wishlist for Woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.85 ▼2.41
Dashboard /wp-admin3.35 ▲0.0555.23 ▲1.45
Posts /wp-admin/edit.php3.40 ▲0.0548.24 ▼3.20
Add New Post /wp-admin/post-new.php5.93 ▲0.0587.55 ▼5.81
Media Library /wp-admin/upload.php3.27 ▲0.0536.68 ▼0.15

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Wishlist for Woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲9314.54 ▲0.171.87 ▲0.0738.35 ▼6.24
Dashboard /wp-admin2,207 ▲275.64 ▲0.0389.17 ▼10.2236.74 ▼3.85
Posts /wp-admin/edit.php2,124 ▲242.03 ▲0.0437.68 ▲0.2238.67 ▼0.19
Add New Post /wp-admin/post-new.php1,377 ▼15117.34 ▼5.77609.63 ▼75.9341.80 ▼12.42
Media Library /wp-admin/upload.php1,418 ▲214.19 ▼0.01103.06 ▼6.4544.92 ▼0.88

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wishlist-for-woocommerce/pwlp_share.php
    • > /wp-content/plugins/wishlist-for-woocommerce/all-plugin.php
  • 12× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: share_gp in wp-content/plugins/wishlist-for-woocommerce/pwlp_share.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wishlist-for-woocommerce/pwlp_genral.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/wishlist-for-woocommerce/libs/tgm/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/wishlist-for-woocommerce/libs/tgm/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wishlist-for-woocommerce/wishlist_short_code.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/wishlist-for-woocommerce/libs/tgm/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/wishlist-for-woocommerce/pwlp_style_setting.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/wishlist-for-woocommerce/pwlp_share_setting.php:2
    • > PHP Notice
      Undefined variable: share_pin in wp-content/plugins/wishlist-for-woocommerce/pwlp_share.php on line 16
    • > PHP Notice
      Undefined variable: share_fb in wp-content/plugins/wishlist-for-woocommerce/pwlp_share.php on line 4

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)
No browser errors were detected

Optimizations

Plugin configuration 80% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 25 tag instead of maximum 10
The official readme.txt is a good inspiration

wishlist-for-woocommerce/Woocommerce_wishlist_lite.php 62% from 13 tests

The main PHP file in "Wishlist for Woocommerce" ver. 1.4.7 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Domain Path: The domain path folder was not found ("/i18n/languages/")
  • Description: The description should be shorter than 140 characters (currently 370 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("wishlist-for-woocommerce.php" instead of "Woocommerce_wishlist_lite.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "2.6.0")

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 plugin3,010 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP128491,7122,887
CSS2111163
JavaScript328060

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity48.14
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity4.27
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods101
▷ Static methods54.95%
▷ Public methods7877.23%
▷ Protected methods2322.77%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.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
18 PNG files occupy 0.26MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/style-options.png84.50KB29.90KB▼ 64.61%
images/multiple-wishlist.png15.88KB6.13KB▼ 61.43%
images/button-type.png17.42KB7.87KB▼ 54.80%
images/popular-products.png52.82KB19.17KB▼ 63.71%
images/image-frame-odd.png0.90KB0.81KB▼ 10.31%