87% wishlist-for-woocommerce

Code Review | Wishlist for Woocommerce

WordPress plugin Wishlist for Woocommerce scored 87% 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: 5.9.2
  • 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

30+ active / 11,224 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼302.83ms] Passed 4 tests

This is a short check of server-side resources used by Wishlist for Woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0560.56 ▲8.11
Dashboard /wp-admin3.46 ▲0.0533.88 ▼48.62
Posts /wp-admin/edit.php3.69 ▲0.0572.89 ▲22.12
Add New Post /wp-admin/post-new.php6.93 ▼0.0491.99 ▼1,172.67
Media Library /wp-admin/upload.php3.34 ▲0.0524.42 ▲1.86

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 36 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Wishlist for Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,913 ▲15915.46 ▲0.246.26 ▼0.0034.94 ▲32.53
Dashboard /wp-admin2,922 ▲686.12 ▼0.05116.76 ▼26.46158.24 ▼16.06
Posts /wp-admin/edit.php2,724 ▲303.24 ▲0.0065.74 ▼25.19168.68 ▲19.36
Add New Post /wp-admin/post-new.php1,695 ▲3417.27 ▲1.67418.89 ▼11.03211.89 ▲53.59
Media Library /wp-admin/upload.php1,739 ▲455.54 ▲0.01118.55 ▼72.22167.30 ▼35.84

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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
Please fix the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wishlist-for-woocommerce/all-plugin.php
    • > /wp-content/plugins/wishlist-for-woocommerce/pwlp_share.php
  • 12× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wishlist-for-woocommerce/wishlist_premium.php:2
    • > 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 plugin_dir_url() in wp-content/plugins/wishlist-for-woocommerce/pwlp_genral.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wishlist-for-woocommerce/wishlist_short_code.php:3
    • > PHP Notice
      Undefined variable: share_twt in wp-content/plugins/wishlist-for-woocommerce/pwlp_share.php on line 10
    • > 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 Notice
      Undefined variable: share_pin in wp-content/plugins/wishlist-for-woocommerce/pwlp_share.php on line 16
    • > 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 Notice
      Undefined variable: share_fb in wp-content/plugins/wishlist-for-woocommerce/pwlp_share.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/wishlist-for-woocommerce/pwlp_share_setting.php:2

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 80% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (25 tag instead of maximum 10)
You can look at the official readme.txt

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

"Wishlist for Woocommerce" version 1.4.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wishlist-for-woocommerce.php" instead of "Woocommerce_wishlist_lite.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 370 characters long)
  • Domain Path: The domain path points to an invalid folder, "/i18n/languages/" does not exist
  • 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 | An overview of files in this plugin; executable files are not allowed
There were no executable 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

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
18 PNG files occupy 0.26MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/premium-head.png6.61KB5.20KB▼ 21.37%
images/button-type.png17.42KB7.87KB▼ 54.80%
images/popular-products.png52.82KB19.17KB▼ 63.71%
images/logo-wp.png1.20KB0.57KB▼ 52.72%
images/google_plus.png5.15KB1.87KB▼ 63.73%