84% am-wishlist

Code Review | Woocommerce Wishlist

WordPress plugin Woocommerce Wishlist scored84%from 54 tests.

About plugin

  • Plugin page: am-wishlist
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.2
  • WordPress version: 6.3.1
  • First release: Jan 6, 2021
  • Latest release: Dec 10, 2021
  • Number of updates: 7
  • Update frequency: every 49.0 days
  • Top authors: rushikshah (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /479 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
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼5.72ms] Passed 4 tests

Analyzing server-side resources used by Woocommerce Wishlist
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.51 ▼3.86
Dashboard /wp-admin3.31 ▼0.0446.90 ▼9.78
Posts /wp-admin/edit.php3.36 ▲0.0044.08 ▼2.48
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.34 ▼6.75
Media Library /wp-admin/upload.php3.23 ▲0.0032.58 ▼1.66

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woocommerce Wishlist
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲4914.17 ▼0.122.20 ▲0.5044.87 ▲1.42
Dashboard /wp-admin2,195 ▲185.61 ▼0.0683.13 ▼19.9235.72 ▼8.71
Posts /wp-admin/edit.php2,097 ▼02.01 ▼0.0135.92 ▼0.6333.46 ▼4.57
Add New Post /wp-admin/post-new.php1,536 ▲1023.03 ▼0.19777.23 ▲83.7061.64 ▼4.61
Media Library /wp-admin/upload.php1,400 ▼34.18 ▼0.04102.36 ▲1.3944.74 ▲1.53

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function AMWL_get_option() in wp-content/plugins/am-wishlist/includes/public/inc/amwl-shortcode.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/am-wishlist/includes/admin/inc/amwl-add-to-wishlist.php:115
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/am-wishlist/includes/amwl-activation.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/am-wishlist/includes/public/inc/amwl-functions.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/am-wishlist/includes/admin/inc/amwl-wishlist-page-opt.php:179
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/am-wishlist/includes/admin/inc/amwl-general.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/am-wishlist/includes/admin/inc/functions/amwl-functions.php:42

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: "'';"
You can take inspiration from this readme.txt

am-wishlist/amwl-woocommerce-wishlist.php 92% from 13 tests

The entry point to "Woocommerce Wishlist" version 1.0.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("am-wishlist.php" instead of "amwl-woocommerce-wishlist.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin1,890 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP104733851,546
JavaScript25193274
CSS291670

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.10
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions29
▷ Named functions2689.66%
▷ Anonymous functions310.34%
Constants16
▷ Global constants16100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/admin/image/pinterest.png0.70KB0.65KB▼ 7.36%
includes/admin/image/whatsapp.png0.67KB0.61KB▼ 8.80%
includes/admin/image/gmail.png0.73KB0.63KB▼ 12.99%
includes/admin/image/twitter.png0.48KB0.43KB▼ 11.49%
includes/admin/image/copy.png0.39KB0.29KB▼ 26.50%