62% jason-birthday-widget

Code Review | Jason Birthday Widget

WordPress plugin Jason Birthday Widget scored 62% from 54 tests.

About plugin

  • Plugin page: jason-birthday-wi...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Mar 3, 2016
  • Latest release: Mar 4, 2016
  • Number of updates: 6
  • Update frequency: every 0.7 days
  • Top authors: angelorum (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active / 3,801 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.83MB] [CPU: ▼33.66ms] Passed 4 tests

A check of server-side resources used by Jason Birthday Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3540.34 ▲4.89
Dashboard /wp-admin3.12 ▼0.1924.28 ▼27.09
Posts /wp-admin/edit.php3.12 ▼0.2426.02 ▼22.55
Add New Post /wp-admin/post-new.php3.12 ▼2.7724.49 ▼77.00
Media Library /wp-admin/upload.php3.12 ▼0.1125.66 ▼8.00
Jason Birthday Widget /wp-admin/admin.php?page=jason-birthday-widget-settings3.1226.32
Birthdays list /wp-admin/admin.php?page=jason_bd_admin_bday_list3.1231.48

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_jason_birthday_widget
jason_bd_db_version
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Jason Birthday Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲12313.57 ▼0.691.80 ▼0.1236.43 ▼9.45
Dashboard /wp-admin2,253 ▲675.91 ▲0.97103.84 ▼7.8342.10 ▲2.19
Posts /wp-admin/edit.php2,147 ▲582.22 ▲0.0836.89 ▼1.5444.83 ▲11.45
Add New Post /wp-admin/post-new.php1,402 ▼11720.24 ▼2.89539.65 ▼106.2035.90 ▼43.44
Media Library /wp-admin/upload.php1,429 ▲444.18 ▼0.1599.38 ▼2.2343.42 ▼1.05
Jason Birthday Widget /wp-admin/admin.php?page=jason-birthday-widget-settings8822.0527.2436.67
Birthdays list /wp-admin/admin.php?page=jason_bd_admin_bday_list9832.0225.0234.76

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The uninstall procedure has failed, leaving 8 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_jason_birthday_widget
    • jason_bd_db_version
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 14 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=jason_bd_admin_bday_list
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

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
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/jason-birthday-widget/templates/template_1.php
    • > /wp-content/plugins/jason-birthday-widget/jason-birthday.php
    • > /wp-content/plugins/jason-birthday-widget/templates/template_3.php
    • > /wp-content/plugins/jason-birthday-widget/templates/template_2.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/jason-birthday-widget/widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/jason-birthday-widget/listbirthdays.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/jason-birthday-widget/config.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ob_stat() in wp-content/plugins/jason-birthday-widget/shortcode.php:4

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 Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: birthday, incoming, ical, upcoming, users...

jason-birthday-widget/jason-birthday.php 77% from 13 tests

The main file in "Jason Birthday Widget" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: Please improve your description making it at least 10 characters long (currently 0 characters long)
  • 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
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("jason-birthday-widget.php" instead of "jason-birthday.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected1,134 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP11240232916
CSS1217186
JavaScript13216
XML20016

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity13.75
▷ Minimum class complexity3.00
▷ Maximum class complexity33.00
Average method complexity3.43
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods21
▷ Static methods523.81%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
No PNG images were found in this plugin