68% wedding-gifts

Code Review | Wedding Gifts

WordPress plugin Wedding Gifts scored68%from 54 tests.

About plugin

  • Plugin page: wedding-gifts
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Mar 25, 2016
  • Latest release: Mar 28, 2016
  • Number of updates: 19
  • Update frequency: every 0.2 days
  • Top authors: tspycher (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,361 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼2.87ms] Passed 4 tests

This is a short check of server-side resources used by Wedding Gifts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1141.76 ▼2.07
Dashboard /wp-admin3.47 ▲0.1748.77 ▼2.02
Posts /wp-admin/edit.php3.52 ▲0.1750.02 ▼0.67
Add New Post /wp-admin/post-new.php6.01 ▲0.1290.22 ▼6.71
Media Library /wp-admin/upload.php3.33 ▲0.1035.50 ▲1.26
Wedding Gifts /wp-admin/tools.php?page=wedding_gifts3.3134.89

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Wedding Gifts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲11913.40 ▼0.877.54 ▲4.8639.01 ▼7.71
Dashboard /wp-admin2,200 ▲235.66 ▲0.0489.28 ▲2.9838.67 ▼3.60
Posts /wp-admin/edit.php2,108 ▲112.01 ▼0.0038.31 ▲0.9538.18 ▲2.19
Add New Post /wp-admin/post-new.php1,535 ▲623.19 ▼0.63612.25 ▼70.0049.19 ▼7.61
Media Library /wp-admin/upload.php1,411 ▲114.18 ▼0.0298.73 ▼12.3442.71 ▼5.86
Wedding Gifts /wp-admin/tools.php?page=wedding_gifts8842.0024.0431.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie tables were found after uninstall: 2 tables
    • wp_weddinggifts_gifts
    • wp_weddinggifts_donations
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wedding-gifts/admin/partials/list_donations.php
    • > /wp-content/plugins/wedding-gifts/public/partials/gifts.php
    • > /wp-content/plugins/wedding-gifts/admin/partials/list_gifts.php
  • 15× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Wedding_Gifts_EntityManager' not found in wp-content/plugins/wedding-gifts/includes/class-wedding-gifts-entity.php:9
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/wedding-gifts/admin/partials/list_gifts.php on line 19
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wedding-gifts/admin/partials/list_gifts.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/wedding-gifts/admin/partials/options.php:5
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/wedding-gifts/admin/partials/list_donations.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to a member function getGift() on null in wp-content/plugins/wedding-gifts/public/partials/email.php:3
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/wedding-gifts/public/partials/email.php on line 3
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/wedding-gifts/public/partials/gift.php on line 2
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wedding-gifts/public/partials/gifts.php on line 19
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/wedding-gifts/public/partials/gifts.php on line 19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wedding-gifts === )
The official readme.txt might help

wedding-gifts/wp-weddinggifts.php 92% from 13 tests

The principal PHP file in "Wedding Gifts" v. 1.1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wedding-gifts.php" instead of "wp-weddinggifts.php")

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
No dangerous file extensions were detected684 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP20254663678
JavaScript24546
CSS2080

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity2.82
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.23
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes19.09%
▷ Concrete classes1090.91%
▷ Final classes00.00%
Methods81
▷ Static methods1316.05%
▷ Public methods7390.12%
▷ Protected methods11.23%
▷ Private methods78.64%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin