78% happy-birthday-reminder

Code Review | Happy Birthday Reminder

WordPress plugin Happy Birthday Reminder scored78%from 54 tests.

About plugin

  • Plugin page: happy-birthday-re...
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9
  • WordPress version: 6.3.1
  • First release: Aug 7, 2018
  • Latest release: Aug 9, 2018
  • Number of updates: 6
  • Update frequency: every 1.8 days
  • Top authors: samchief (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /1,837 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.40ms] Passed 4 tests

Server-side resources used by Happy Birthday Reminder
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.19 ▲1.62
Dashboard /wp-admin3.37 ▲0.0745.87 ▼0.80
Posts /wp-admin/edit.php3.48 ▲0.1346.12 ▼6.97
Add New Post /wp-admin/post-new.php5.95 ▲0.0688.24 ▼7.44
Media Library /wp-admin/upload.php3.29 ▲0.0636.94 ▲4.94
Happy Birthday Reminder /wp-admin/options-general.php?page=happy-birthday-reminder/happy-birthday-reminder-options.php3.2330.71

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Happy Birthday Reminder
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.44 ▼0.941.69 ▲0.0442.07 ▲0.97
Dashboard /wp-admin2,210 ▲225.75 ▼0.1593.15 ▼9.6338.49 ▼4.68
Posts /wp-admin/edit.php2,096 ▲42.06 ▲0.0442.32 ▲8.2135.34 ▲2.90
Add New Post /wp-admin/post-new.php1,374 ▼16816.52 ▼1.64522.66 ▼83.1454.64 ▼1.06
Media Library /wp-admin/upload.php1,395 ▲104.21 ▼0.0697.62 ▲2.4942.97 ▲0.27
Happy Birthday Reminder /wp-admin/options-general.php?page=happy-birthday-reminder/happy-birthday-reminder-options.php8892.1824.3034.92

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=happy-birthday-reminder/happy-birthday-reminder-options.php
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method qb_Birthday_Options::qb_Birthday_Reminder_Options() should not be called statically
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=happy-birthday-reminder/happy-birthday-reminder-options.php
    • > Notice in wp-content/plugins/happy-birthday-reminder/happy-birthday-reminder-options.php+81
    Trying to access array offset on value of type bool

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
Please fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/happy-birthday-reminder/happy-birthday-reminder-mail.php:64
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/happy-birthday-reminder/happy-birthday-extra-profile-fields.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/happy-birthday-reminder/happy-birthday-reminder-options.php:100
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/happy-birthday-reminder/happy-birthday-reminder.php:53

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 96% from 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
6 plugin tags: date of birth, happy birthday reminder, users birthday, upcoming birthdays, birthdays celebrants...

happy-birthday-reminder/happy-birthday-reminder.php 92% from 13 tests

The main PHP script in "Happy Birthday Reminder" version 1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("3.5" instead of "4.9")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin225 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP43122225

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions571.43%
▷ Anonymous functions228.57%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin