63% wp-wishlist

Code Review | WordPress Wishlist

WordPress plugin WordPress Wishlist scored63%from 54 tests.

About plugin

  • Plugin page: wp-wishlist
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.0.3
  • WordPress version: 6.3.1
  • First release: Jan 20, 2019
  • Latest release: Feb 28, 2019
  • Number of updates: 3
  • Update frequency: every 14.0 days
  • Top authors: pluginrox (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /952 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲1.14MB] [CPU: ▲328.46ms] 50% from 4 tests

Server-side resources used by WordPress Wishlist
Please have a look at the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 504.75ms on /wp-admin/post-new.php?post_type=rox_wishlist)
  • Extra CPU: Try to keep extra CPU usage under 200.00ms (currently 328.46ms on /wp-admin/admin.php?page=wp_wishlist)
PageMemory (MB)CPU Time (ms)
Home /4.30 ▲0.8354.27 ▲12.79
Dashboard /wp-admin4.55 ▲1.24505.80 ▲452.97
Posts /wp-admin/edit.php4.61 ▲1.25497.83 ▲444.95
Add New Post /wp-admin/post-new.php7.14 ▲1.25528.59 ▲419.82
Media Library /wp-admin/upload.php4.45 ▲1.22476.93 ▲436.29
Rox Plugins /wp-admin/admin.php?page=rox_plugins4.65493.79
Categories /wp-admin/edit-tags.php?taxonomy=rox_wishlist_cat&post_type=rox_wishlist4.50484.28
Add New /wp-admin/post-new.php?post_type=rox_wishlist4.64504.75
Tags /wp-admin/edit-tags.php?taxonomy=rox_wishlist_tag&post_type=rox_wishlist4.47489.13
All Lists /wp-admin/edit.php?post_type=rox_wishlist4.55476.35
Wishtlist /wp-admin/admin.php?page=wp_wishlist4.45474.47

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 97 new files
Database: 2 new tables, 14 new options
New tables
wp_rox_wishlist_contributors
wp_rox_wishlist_items
New WordPress options
wp_wishlist_general
rox_wishlist_cat_children
rox_wp_wishlist_permalinks
__rox_wpwl_default_list_cat
widget_recent-posts
db_upgraded
wp_wishlist_advanced
rox_wp_wishlist_installed
widget_theysaidso_widget
can_compress_scripts
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for WordPress Wishlist
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,325 ▲56415.18 ▲0.777.90 ▲5.9737.65 ▼5.08
Dashboard /wp-admin2,507 ▲3306.43 ▲0.77115.82 ▲26.6193.04 ▲52.35
Posts /wp-admin/edit.php2,463 ▲3663.61 ▲1.6552.25 ▲14.5755.10 ▲17.50
Add New Post /wp-admin/post-new.php1,695 ▲16923.51 ▼0.20688.57 ▼31.4135.25 ▼33.12
Media Library /wp-admin/upload.php1,590 ▲1904.46 ▲0.2785.06 ▼12.9781.86 ▲37.94
Rox Plugins /wp-admin/admin.php?page=rox_plugins1,7013.6146.2061.67
Categories /wp-admin/edit-tags.php?taxonomy=rox_wishlist_cat&post_type=rox_wishlist1,7353.4547.8481.07
Add New /wp-admin/post-new.php?post_type=rox_wishlist2,6858.07173.96135.20
Tags /wp-admin/edit-tags.php?taxonomy=rox_wishlist_tag&post_type=rox_wishlist1,6143.4446.4483.82
All Lists /wp-admin/edit.php?post_type=rox_wishlist1,4373.6248.4766.84
Wishtlist /wp-admin/admin.php?page=wp_wishlist1,4103.7956.9864.67

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'deactivation' not found or invalid function name
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_rox_wishlist_contributors
    • wp_rox_wishlist_items
  • The uninstall procedure has failed, leaving 14 options in the database
    • rox_wp_wishlist_installed
    • can_compress_scripts
    • wp_wishlist_advanced
    • __rox_wpwl_default_list_cat
    • current_theme_supports_wp_wishlist
    • db_upgraded
    • wp_wishlist_queue_flush_rewrite_rules
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • ...

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Interface 'Hashids\\Math\\MathInterface' not found in wp-content/plugins/wp-wishlist/vendor/hashids/hashids/src/Math/Bc.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-wishlist/includes/class.RoxWPWLAdmin.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-wishlist/includes/class.RoxWPWLPostTypes.php:23
    • > PHP Fatal error
      Uncaught Error: Interface 'Hashids\\Math\\MathInterface' not found in wp-content/plugins/wp-wishlist/vendor/hashids/hashids/src/Math/Gmp.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Hashids\\HashidsInterface' not found in wp-content/plugins/wp-wishlist/vendor/hashids/hashids/src/Hashids.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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 require attention:
  • Screenshots: Please add images for these screenshots: #1 (screenshot-1), #2 (screenshot-2)
The official readme.txt might help

wp-wishlist/wp-wishlist.php 85% from 13 tests

The main PHP script in "WordPress Wishlist" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Domain Path: The domain path folder was not found ("/languages/")
  • 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

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
Good job! No executable or dangerous file extensions detected21,861 lines of code in 85 files:
LanguageFilesBlank linesComment linesLines of code
JSON50012,814
PHP426992,5265,168
Sass153161,321
CSS446351,255
JavaScript7782711,076
SVG1100216
Ruby12911

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity23.96
▷ Minimum class complexity1.00
▷ Maximum class complexity76.00
Average method complexity3.43
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces3
Interfaces2
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes29.09%
Methods229
▷ Static methods8537.12%
▷ Public methods19685.59%
▷ Protected methods114.80%
▷ Private methods229.61%
Functions109
▷ Named functions10091.74%
▷ Anonymous functions98.26%
Constants11
▷ Global constants981.82%
▷ Class constants218.18%
▷ Public constants2100.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 files were detected