10% advanced-wishlist-for-woocommerce

Code Review | Advanced Wishlist for WooCommerce

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

About plugin

  • Plugin page: advanced-wishlist...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.1
  • WordPress version: 6.3.1
  • First release: Jan 31, 2023
  • Latest release: Jan 31, 2023
  • Number of updates: 10
  • Update frequency: every 2.8 days
  • Top authors: algol.plus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /138 total downloads

Benchmarks

Plugin footprint 5% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure had errors
    • > Error in wp-content/plugins/advanced-wishlist-for-woocommerce/src/Logger/LoggerImpl.php+20
    Uncaught Error: Call to undefined function AlgolWishlist\Logger\wc_get_logger() in wp-content/plugins/advanced-wishlist-for-woocommerce/src/Logger/LoggerImpl.php:20
    Stack trace:
    #0 wp-content/plugins/advanced-wishlist-for-woocommerce/src/Context.php(35): AlgolWishlist\Logger\LoggerImpl->__construct()
    #1 wp-content/plugins/advanced-wishlist-for-woocommerce/awlContext.php(20): AlgolWishlist\Context->__construct()
    #2 wp-content/plugins/advanced-wishlist-for-woocommerce/src/VersionFree/WishlistPageApp/WishlistPage.php(16): awlContext()
    #3 wp-content/plugins/advanced-wishlist-for-woocommerce/src/VersionFree/PluginActions.php(62): AlgolWishlist\VersionFree\WishlistPageApp\WishlistPage->__construct()
    #4 wp-includes/class-wp-hook.php(310): AlgolWishlist\VersionFree\PluginActions->install()
    #5 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #6 wp-includes/

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

Analyzing server-side resources used by Advanced Wishlist for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.78 ▲0.66
Dashboard /wp-admin3.31 ▼0.0446.07 ▼14.42
Posts /wp-admin/edit.php3.36 ▲0.0049.88 ▲6.45
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.91 ▼10.88
Media Library /wp-admin/upload.php3.23 ▲0.0035.12 ▲2.26

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 593 new files
Database: 2 new tables, 6 new options
New tables
wp_algol_wishlist_wishlists_and_products
wp_algol_wishlist_wishlists
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Advanced Wishlist for WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.20 ▼1.381.75 ▲0.1844.72 ▲3.49
Dashboard /wp-admin2,209 ▲184.88 ▼0.00101.21 ▼1.9738.33 ▼6.10
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0539.11 ▲2.5735.76 ▲0.41
Add New Post /wp-admin/post-new.php1,533 ▲523.13 ▲4.90637.89 ▼17.6055.94 ▲2.34
Media Library /wp-admin/upload.php1,385 ▼64.16 ▼0.0897.64 ▼1.5140.92 ▼6.18

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Error in wp-content/plugins/advanced-wishlist-for-woocommerce/src/Logger/LoggerImpl.php+20
    Uncaught Error: Call to undefined function AlgolWishlist\Logger\wc_get_logger() in wp-content/plugins/advanced-wishlist-for-woocommerce/src/Logger/LoggerImpl.php:20
    Stack trace:
    #0 wp-content/plugins/advanced-wishlist-for-woocommerce/src/Context.php(35): AlgolWishlist\Logger\LoggerImpl->__construct()
    #1 wp-content/plugins/advanced-wishlist-for-woocommerce/awlContext.php(20): AlgolWishlist\Context->__construct()
    #2 wp-content/plugins/advanced-wishlist-for-woocommerce/src/VersionFree/PluginActions.php(72): awlContext()
    #3 wp-content/plugins/advanced-wishlist-for-woocommerce/uninstall.php(10): AlgolWishlist\VersionFree\PluginActions->uninstall()
    #4 wp-admin/includes/plugin.php(1245): include_once('/var/www/wordpr...')
    #5 wp-admin/includes/plugin.php(960): uninstall_plugin()
  • The plugin did not uninstall correctly, leaving 593 files (6.67MB) in the plugin directory
    • (new file) README.md
    • (new file) src/API/Controllers/AdminPopularItems.php
    • (new file) readme.txt
    • (new file) advanced-wishlist-for-woocommerce.php
    • (new file) awlContext.php
    • (new file) languages/.gitkeep
    • (new file) composer.json
    • (new file) composer.lock
    • (new file) src/API/Controllers/AdminItemsOfWishlist.php
    • (new file) package-lock.json
    • ...
  • Zombie tables were found after uninstall: 2 tables
    • wp_algol_wishlist_wishlists_and_products
    • wp_algol_wishlist_wishlists
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • recovery_mode_email_last_sent
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 131× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'OpenApi\\Annotations\\Operation' not found in wp-content/plugins/advanced-wishlist-for-woocommerce/vendor/zircote/swagger-php/src/Annotations/Options.php:12
    • > PHP Fatal error
      Trait 'OpenApi\\Processors\\Concerns\\DocblockTrait' not found in wp-content/plugins/advanced-wishlist-for-woocommerce/vendor/zircote/swagger-php/src/Processors/AugmentProperties.php on line 17
    • > PHP Parse error
      syntax error, unexpected '|', expecting variable (T_VARIABLE) in wp-content/plugins/advanced-wishlist-for-woocommerce/vendor/zircote/swagger-php/src/Attributes/Examples.php on line 22
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Yaml\\Exception\\RuntimeException' not found in wp-content/plugins/advanced-wishlist-for-woocommerce/vendor/symfony/yaml/Exception/DumpException.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'OpenApi\\Annotations\\Parameter' not found in wp-content/plugins/advanced-wishlist-for-woocommerce/vendor/zircote/swagger-php/src/Attributes/Parameter.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'AlgolWishlist\\Logger\\ILogger' not found in wp-content/plugins/advanced-wishlist-for-woocommerce/src/Logger/LoggerImpl.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'OpenApi\\Annotations\\AbstractAnnotation' not found in wp-content/plugins/advanced-wishlist-for-woocommerce/vendor/zircote/swagger-php/src/Annotations/Info.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Yaml\\Exception\\ExceptionInterface' not found in wp-content/plugins/advanced-wishlist-for-woocommerce/vendor/symfony/yaml/Exception/RuntimeException.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Finder\\Iterator\\MultiplePcreFilterIterator' not found in wp-content/plugins/advanced-wishlist-for-woocommerce/vendor/symfony/finder/Iterator/PathFilterIterator.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'OpenApi\\Analysers\\AnalyserInterface' not found in wp-content/plugins/advanced-wishlist-for-woocommerce/vendor/zircote/swagger-php/src/Analysers/ReflectionAnalyser.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: woocommerce, wishlist

advanced-wishlist-for-woocommerce/advanced-wishlist-for-woocommerce.php 85% from 13 tests

Analyzing the main PHP file in "Advanced Wishlist for WooCommerce" version 1.0.0
The following require your attention:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("6.1" instead of "6.0")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin121,415 lines of code in 565 files:
LanguageFilesBlank linesComment linesLines of code
JSON260089,384
PHP3575,05711,67122,287
JavaScript84799295,911
TypeScript601783,1302,463
Markdown192870685
CSS10520338
reStructuredText4221340250
HTML20036
Bourne Shell113831
XML24330

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 130)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity11.06
▷ Minimum class complexity1.00
▷ Maximum class complexity299.00
Average method complexity3.95
▷ Minimum method complexity1.00
▷ Maximum method complexity130.00
Code structure
Namespaces64
Interfaces20
Traits9
Classes310
▷ Abstract classes103.23%
▷ Concrete classes30096.77%
▷ Final classes206.67%
Methods1,165
▷ Static methods16414.08%
▷ Public methods94481.03%
▷ Protected methods958.15%
▷ Private methods12610.82%
Functions130
▷ Named functions3325.38%
▷ Anonymous functions9774.62%
Constants171
▷ Global constants74.09%
▷ Class constants16495.91%
▷ Public constants14085.37%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin