10% premmerce-woocommerce-wishlist

Code Review | Premmerce Wishlist for WooCommerce

WordPress plugin Premmerce Wishlist for WooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: premmerce-woocomm...
  • Plugin version: 1.1.10
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 16, 2018
  • Latest release: Aug 11, 2023
  • Number of updates: 25
  • Update frequency: every 81.4 days
  • Top authors: premmerce (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active /20,380 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▲5.00MB] [CPU: ▲23.16ms] 75% from 4 tests

This is a short check of server-side resources used by Premmerce Wishlist for WooCommerce
Please take the time to fix the following items
  • Extra RAM: The extra memory usage must be under 5MB (currently 5.00MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.85 ▲5.3967.96 ▲25.99
Dashboard /wp-admin8.87 ▲5.5776.98 ▲30.75
Posts /wp-admin/edit.php8.87 ▲5.5281.21 ▲26.61
Add New Post /wp-admin/post-new.php9.43 ▲3.54107.15 ▲9.27
Media Library /wp-admin/upload.php8.87 ▲5.6471.76 ▲38.70
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius8.8757.45

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 250 new files
Database: 1 new table, 11 new options
New tables
wp_premmerce_wishlist
New WordPress options
fs_accounts
widget_premmerce_wishlist_widget
fs_debug_mode
fs_active_plugins
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

Premmerce Wishlist for WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.22 ▼1.171.55 ▼0.3629.46 ▼18.77
Dashboard /wp-admin2,228 ▲405.81 ▲0.9198.14 ▼14.7641.72 ▼1.73
Posts /wp-admin/edit.php2,113 ▲242.02 ▲0.0039.51 ▲0.5938.85 ▲5.78
Add New Post /wp-admin/post-new.php1,526 ▼723.15 ▼0.11684.05 ▼0.1957.28 ▲3.82
Media Library /wp-admin/upload.php1,407 ▲194.14 ▼0.0598.41 ▼1.8845.35 ▲2.47
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0682.2024.1928.58

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/premmerce-woocommerce-wishlist/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 11 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • fs_active_plugins
    • widget_recent-comments
    • widget_recent-posts
    • fs_accounts
    • db_upgraded
    • widget_premmerce_wishlist_widget
    • premmerce-wishlist-page-id
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
  • 35× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function premmerce_wishlist() in wp-content/plugins/premmerce-woocommerce-wishlist/views/widget/wishlist-widget.php:10
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/premmerce-woocommerce-wishlist/views/frontend/wishlist-popup.php on line 11
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/premmerce-woocommerce-wishlist/views/frontend/wishlist-page.php on line 16
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/premmerce-woocommerce-wishlist/views/widget/wishlist-widget.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/premmerce-woocommerce-wishlist/src/Admin/WishlistTable.php on line 8
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/premmerce-woocommerce-wishlist/src/Admin/WishlistTable.php on line 8
    • > PHP Notice
      Undefined variable: wishlists in wp-content/plugins/premmerce-woocommerce-wishlist/views/frontend/wishlist-page.php on line 16
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/premmerce-woocommerce-wishlist/src/Admin/WishlistViewTable.php on line 7
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/premmerce-woocommerce-wishlist/views/frontend/wishlist-popup.php on line 35
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/premmerce-woocommerce-wishlist/src/Admin/WishlistViewTable.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: wishlist, product wishlist, premmerce, e-commerce, woocommerce wishlist...

premmerce-woocommerce-wishlist/premmerce-wishlist.php 77% from 13 tests

The principal PHP file in "Premmerce Wishlist for WooCommerce" v. 1.1.10 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("4.8" instead of "3.0.0")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("premmerce-woocommerce-wishlist.php" instead of "premmerce-wishlist.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin37,768 lines of code in 202 files:
LanguageFilesBlank linesComment linesLines of code
PHP1618,68218,45335,805
CSS17498562
Markdown31700400
JavaScript774101352
PO File2140180280
Sass8561275
JSON40094

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
These items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity72.76
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.36
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces12
Interfaces1
Traits0
Classes65
▷ Abstract classes23.08%
▷ Concrete classes6396.92%
▷ Final classes00.00%
Methods1,446
▷ Static methods21915.15%
▷ Public methods1,01770.33%
▷ Protected methods281.94%
▷ Private methods40127.73%
Functions108
▷ Named functions10092.59%
▷ Anonymous functions87.41%
Constants155
▷ Global constants9863.23%
▷ Class constants5736.77%
▷ Public constants57100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%