74% better-wishlist

Code Review | Better Wishlist

WordPress plugin Better Wishlist scored 74% from 54 tests.

About plugin

  • Plugin page: better-wishlist
  • Plugin version: 0.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Jul 3, 2022
  • Latest release: Jul 11, 2023
  • Number of updates: 6
  • Update frequency: every 82.5 days
  • Top authors: wpdevteam (66.67%)priyomukul (50%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 626 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.72ms] Passed 4 tests

Analyzing server-side resources used by Better Wishlist
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0335.00 ▼5.82
Dashboard /wp-admin3.41 ▲0.1044.32 ▼8.72
Posts /wp-admin/edit.php3.46 ▲0.1050.15 ▲3.94
Add New Post /wp-admin/post-new.php5.92 ▲0.0481.70 ▼18.35
Media Library /wp-admin/upload.php3.27 ▲0.0437.16 ▲2.02
Better Wishlist /wp-admin/admin.php?page=betterwishlist3.2530.36

Server storage [IO: ▲1.32MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 440 new files
Database: 2 new tables, 7 new options
New tables
wp_better_wishlist_lists
wp_better_wishlist_items
New WordPress options
theysaidso_admin_options
bw_settings
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Better Wishlist
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲7713.37 ▼1.011.56 ▼0.1541.24 ▼0.41
Dashboard /wp-admin2,218 ▲304.88 ▼0.02112.53 ▲8.5244.29 ▲7.28
Posts /wp-admin/edit.php2,103 ▲141.99 ▼0.0041.78 ▲4.7839.42 ▲7.02
Add New Post /wp-admin/post-new.php1,550 ▲3623.19 ▲5.69650.78 ▼10.1257.81 ▲4.86
Media Library /wp-admin/upload.php1,397 ▲64.31 ▲0.1992.66 ▼5.1142.56 ▼1.18
Better Wishlist /wp-admin/admin.php?page=betterwishlist1,3298.24216.7341.78

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_better_wishlist_items
    • wp_better_wishlist_lists
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • bw_settings
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
The following issues need your attention
  • 147× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Unary\\AbstractUnary' not found in wp-content/plugins/better-wishlist/vendor/twig/twig/src/Node/Expression/Unary/NegUnary.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/better-wishlist/vendor/twig/twig/src/Node/Expression/Binary/LessBinary.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/better-wishlist/vendor/twig/twig/src/Node/Expression/Binary/StartsWithBinary.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\ameExpression' not found in wp-content/plugins/better-wishlist/vendor/twig/twig/src/Node/Expression/AssignNameExpression.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Extension\\AbstractExtension' not found in wp-content/plugins/better-wishlist/vendor/twig/twig/src/Extension/StagingExtension.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/better-wishlist/vendor/twig/twig/src/Node/Expression/AbstractExpression.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/better-wishlist/vendor/twig/twig/src/Node/Expression/Binary/BitwiseOrBinary.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\TokenParser\\AbstractTokenParser' not found in wp-content/plugins/better-wishlist/vendor/twig/twig/src/TokenParser/DeprecatedTokenParser.php:27
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig\\RuntimeLoader\\RuntimeLoaderInterface' not found in wp-content/plugins/better-wishlist/vendor/twig/twig/src/RuntimeLoader/ContainerRuntimeLoader.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\TokenParser\\AbstractTokenParser' not found in wp-content/plugins/better-wishlist/vendor/twig/twig/src/TokenParser/ExtendsTokenParser.php:24

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 on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: woocommerce, wishlist, ecommerce wishlist, e-commerce, shop

better-wishlist/better-wishlist.php Passed 13 tests

The primary PHP file in "Better Wishlist" version 0.0.3 is used by WordPress to initiate all plugin functionality
50 characters long description:
Wishlist functionality for your WooCommerce store.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected23,369 lines of code in 429 files:
LanguageFilesBlank linesComment linesLines of code
PHP3874,0115,67218,207
JavaScript142681142,166
CSS3127301,676
JSON200354
Sass188342
Twig3180330
SVG1809284
reStructuredText18510

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity5.52
▷ Minimum class complexity1.00
▷ Maximum class complexity166.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces28
Interfaces14
Traits0
Classes356
▷ Abstract classes113.09%
▷ Concrete classes34596.91%
▷ Final classes5215.07%
Methods933
▷ Static methods869.22%
▷ Public methods79985.64%
▷ Protected methods596.32%
▷ Private methods758.04%
Functions174
▷ Named functions15890.80%
▷ Anonymous functions169.20%
Constants66
▷ Global constants1624.24%
▷ Class constants5075.76%
▷ Public constants4998.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
No PNG images were found in this plugin