63% wpgiftregistry

Code Review | Simple Wishlists for Weddings, Birthdays etc.

WordPress plugin Simple Wishlists for Weddings, Birthdays etc. scored 63% from 54 tests.

About plugin

  • Plugin page: wpgiftregistry
  • Plugin version: 1.4.13
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.4.2
  • WordPress version: 6.3.1
  • First release: Mar 3, 2017
  • Latest release: Jul 24, 2020
  • Number of updates: 151
  • Update frequency: every 8.2 days
  • Top authors: 3qbik (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

900+ active / 17,431 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.06MB] [CPU: ▼43.26ms] Passed 4 tests

Analyzing server-side resources used by Simple Wishlists for Weddings, Birthdays etc.
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1148.92 ▼2.66
Dashboard /wp-admin2.89 ▼0.4219.15 ▼42.58
Posts /wp-admin/edit.php2.89 ▼0.4721.46 ▼29.60
Add New Post /wp-admin/post-new.php2.89 ▼3.0021.26 ▼82.53
Media Library /wp-admin/upload.php2.89 ▼0.3420.99 ▼18.32
All Wishlists /wp-admin/edit.php?post_type=wpgr_wishlist2.8920.74
Settings /wp-admin/edit.php?post_type=wpgr_wishlist&page=wpgr_settings2.8918.52
Add New /wp-admin/post-new.php?post_type=wpgr_wishlist2.8921.81

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 970 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
wpgr_settings
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Wishlists for Weddings, Birthdays etc.
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,013 ▲21314.01 ▼0.3910.60 ▲8.5583.19 ▲34.00
Dashboard /wp-admin2,279 ▲735.90 ▲1.06101.65 ▼12.2169.25 ▲26.02
Posts /wp-admin/edit.php2,174 ▲852.11 ▲0.0742.65 ▲2.5638.65 ▲4.76
Add New Post /wp-admin/post-new.php1,631 ▲8924.49 ▲6.21824.30 ▲212.1835.48 ▼19.89
Media Library /wp-admin/upload.php1,470 ▲884.24 ▲0.07108.34 ▲5.8877.69 ▲35.52
All Wishlists /wp-admin/edit.php?post_type=wpgr_wishlist1,1572.0336.2132.26
Settings /wp-admin/edit.php?post_type=wpgr_wishlist&page=wpgr_settings9962.3030.1230.52
Add New /wp-admin/post-new.php?post_type=wpgr_wishlist2,1854.7887.7198.98

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/wpgiftregistry/admin/class-wp-gift-registry-admin.php+330
    Trying to access array offset on value of type bool
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 16 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wpgr_wishlist
    • > Notice in wp-content/plugins/wpgiftregistry/admin/class-wp-gift-registry-admin.php+877
    Trying to access array offset on value of type bool
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wpgr_wishlist
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP 0% 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
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wpgiftregistry/admin/partials/wp-gift-registry-admin-display.php
    • > /wp-content/plugins/wpgiftregistry/public/partials/wp-gift-registry-public-display.php
  • 189× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/wpgiftregistry/includes/libraries/cmb2/includes/types/CMB2_Type_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wpgiftregistry/includes/libraries/wp-plugin-usage-tracker/vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wpgiftregistry/includes/libraries/wp-plugin-usage-tracker/vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wpgiftregistry/includes/libraries/wp-plugin-usage-tracker/vendor/composer/installers/src/Composer/Installers/ElggInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wpgiftregistry/includes/libraries/wp-plugin-usage-tracker/vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wpgiftregistry/includes/libraries/wp-plugin-usage-tracker/vendor/composer/installers/tests/Composer/Installers/Test/VgmcpInstallerTest.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wpgiftregistry/includes/libraries/wp-plugin-usage-tracker/vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/wpgiftregistry/includes/libraries/cmb2/includes/includes/types/CMB2_Type_Multi_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/wpgiftregistry/includes/libraries/cmb2/includes/types/CMB2_Type_Taxonomy_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wpgiftregistry/includes/libraries/wp-plugin-usage-tracker/vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
9 plugin tags: wedding, gift registry, wishlist, plugin, product list...

wpgiftregistry/wpgiftregistry.php Passed 13 tests

The entry point to "Simple Wishlists for Weddings, Birthdays etc." version 1.4.13 is a PHP file that has certain tags in its header comment area
92 characters long description:
A simple way to create a linked list of wishes for your wedding, birthday or other occasion.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin77,272 lines of code in 428 files:
LanguageFilesBlank linesComment linesLines of code
PO File12214,47318,74332,747
JSON90013,979
PHP1963,5298,66413,301
CSS198671,7097,492
Sass341,425575,105
JavaScript278901,4103,201
Markdown941901,229
SVG707127
YAML3165160
XML26231

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity11.79
▷ Minimum class complexity1.00
▷ Maximum class complexity186.00
Average method complexity3.08
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes259
▷ Abstract classes207.72%
▷ Concrete classes23992.28%
▷ Final classes00.00%
Methods1,356
▷ Static methods19614.45%
▷ Public methods1,11282.01%
▷ Protected methods21816.08%
▷ Private methods261.92%
Functions98
▷ Named functions7677.55%
▷ Anonymous functions2222.45%
Constants26
▷ Global constants726.92%
▷ Class constants1973.08%
▷ Public constants19100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
29 compressed PNG files occupy 0.06MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/libraries/cmb2/includes/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%
includes/libraries/cmb2/includes/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
includes/libraries/cmb2/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
includes/libraries/cmb2/includes/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
includes/libraries/cmb2/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%