77% advanced-product-wishlist-for-woo

Code Review | Advanced Product Wishlist for Woocommerce

WordPress plugin Advanced Product Wishlist for Woocommerce scored77%from 54 tests.

About plugin

  • Plugin page: advanced-product-...
  • Plugin version: 1.0.6
  • PHP compatiblity: 5.3.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.6.1
  • WordPress version: 6.3.1
  • First release: Aug 26, 2019
  • Latest release: Feb 3, 2022
  • Number of updates: 20
  • Update frequency: every 45.9 days
  • Top authors: athemeart (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /14,306 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.82MB] [CPU: ▲0.34ms] Passed 4 tests

A check of server-side resources used by Advanced Product Wishlist for Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.30 ▲0.8457.47 ▲14.08
Dashboard /wp-admin4.26 ▲0.9552.42 ▼2.62
Posts /wp-admin/edit.php4.29 ▲0.9355.36 ▼0.66
Add New Post /wp-admin/post-new.php6.44 ▲0.5591.65 ▼8.30
Media Library /wp-admin/upload.php4.20 ▲0.9750.18 ▲12.92
Advanced Product Wishlist /wp-admin/admin.php?page=advanced-product-wishlist-for-woocomerce4.2155.62

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 92 new files
Database: no new tables, 15 new options
New WordPress options
widget_apww_wishlist_counter_widget
apw_wishtlist_achive
widget_recent-posts
apsw_license_notices_web
theysaidso_admin_options
db_upgraded
apw_general_settings
widget_apww_display_wishlist_widget
apw_layout
apww_license
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advanced Product Wishlist for Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,223 ▲46215.25 ▲0.996.43 ▲4.8341.85 ▼1.27
Dashboard /wp-admin2,508 ▲3286.47 ▲0.71115.99 ▲23.7642.24 ▲3.64
Posts /wp-admin/edit.php2,306 ▲2033.61 ▲1.6056.59 ▲15.8536.76 ▼1.83
Add New Post /wp-admin/post-new.php1,724 ▲17922.63 ▼0.76608.40 ▼73.1837.31 ▼13.77
Media Library /wp-admin/upload.php1,442 ▲454.53 ▲0.3388.56 ▼20.3142.64 ▼3.90
Advanced Product Wishlist /wp-admin/admin.php?page=advanced-product-wishlist-for-woocomerce3,8405.41148.9653.29

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 15 options
    • apw_layout
    • apww_license
    • widget_theysaidso_widget
    • apw_general_settings
    • db_upgraded
    • apw_social_share
    • widget_recent-comments
    • widget_apww_display_wishlist_widget
    • theysaidso_admin_options
    • apww_color_scheme
    • ...

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
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 take a closer look at the following
  • 13× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Predic_Widget_Form_Field' not found in wp-content/plugins/advanced-product-wishlist-for-woo/lib/predic-widget/class/fields/class-predic-widget-select-field.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Predic_Widget_Form_Field' not found in wp-content/plugins/advanced-product-wishlist-for-woo/lib/predic-widget/class/fields/class-predic-widget-fa-iconpicker-field.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/advanced-product-wishlist-for-woo/lib/predic-widget/class/class-predic-widget-factory.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/advanced-product-wishlist-for-woo/includes/class-advanced-product-wishlist-for-woocomerce-loader.php:74
    • > PHP Fatal error
      Uncaught Error: Class 'Predic_Widget_Form_Field' not found in wp-content/plugins/advanced-product-wishlist-for-woo/lib/predic-widget/examples/custom-admin-form-field.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Predic_Widget_Form_Field' not found in wp-content/plugins/advanced-product-wishlist-for-woo/lib/predic-widget/class/fields/class-predic-widget-image-uploader-field.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-product-wishlist-for-woo/includes/class-advanced-product-wishlist-for-notices.php:78
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-product-wishlist-for-woo/lib/predic-widget/examples/oop-example.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Predic_Widget_Form_Field' not found in wp-content/plugins/advanced-product-wishlist-for-woo/lib/predic-widget/class/fields/class-predic-widget-color-field.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Predic_Widget_Form_Field' not found in wp-content/plugins/advanced-product-wishlist-for-woo/lib/predic-widget/class/fields/class-predic-widget-textarea-field.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=advanced-product-wishlist-for-woocomerce
    • > Network (severe)
    wp-content/plugins/advanced-product-wishlist-for-woo/admin/css/upgrade.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% 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 require attention:
  • Tags: There are too many tags (14 tag instead of maximum 10)
  • Screenshots: Add images for these screenshots: #1 (Plugins Options 0), #2 (Plugins Options 1), #3 (Plugins Options 2), #4 (Plugins Options 3), #5 (Plugins Options 4)
The official readme.txt is a good inspiration

advanced-product-wishlist-for-woo/advanced-product-wishlist-for-woocomerce.php 77% from 13 tests

The primary PHP file in "Advanced Product Wishlist for Woocommerce" version 1.0.6 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("advanced-product-wishlist-for-woo.php" instead of "advanced-product-wishlist-for-woocomerce.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Requires at least: Required version does not match the one declared in readme.txt ("4.6" instead of "3.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin8,592 lines of code in 68 files:
LanguageFilesBlank linesComment linesLines of code
PHP421,5012,6354,453
SVG2002,720
CSS116173947
JavaScript10228114410
Sass312062

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity20.46
▷ Minimum class complexity1.00
▷ Maximum class complexity164.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes24
▷ Abstract classes14.17%
▷ Concrete classes2395.83%
▷ Final classes00.00%
Methods158
▷ Static methods63.80%
▷ Public methods14491.14%
▷ Protected methods10.63%
▷ Private methods138.23%
Functions14
▷ Named functions1392.86%
▷ Anonymous functions17.14%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.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
6 PNG files occupy 0.22MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/owl-carousel/assets/owl.video.play.png4.86KB2.74KB▼ 43.61%
screenshot-1.png23.63KB13.75KB▼ 41.83%
screenshot-2.png55.66KB29.54KB▼ 46.92%
screenshot-5.png72.09KB45.21KB▼ 37.29%
screenshot-4.png27.14KB15.82KB▼ 41.68%