84% famous-birthdays

Code Review | Famous Birthday Plugin

WordPress plugin Famous Birthday Plugin scored84%from 54 tests.

About plugin

  • Plugin page: famous-birthdays
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 1, 2015
  • Latest release: Feb 2, 2017
  • Number of updates: 22
  • Update frequency: every 19.6 days
  • Top authors: Thorulf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,719 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Server-side resources used by Famous Birthday Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0838.91 ▼1.25
Dashboard /wp-admin3.36 ▲0.0648.06 ▲1.49
Posts /wp-admin/edit.php3.47 ▲0.1249.11 ▲4.27
Add New Post /wp-admin/post-new.php5.94 ▲0.0686.72 ▼7.44
Media Library /wp-admin/upload.php3.28 ▲0.0636.54 ▲0.96
Famous Birthdays /wp-admin/options-general.php?page=fambday3.2533.13

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Famous Birthday Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.25 ▼0.021.50 ▼0.1447.07 ▲9.89
Dashboard /wp-admin2,199 ▲185.63 ▼0.0487.37 ▼20.7745.19 ▲8.41
Posts /wp-admin/edit.php2,107 ▲281.99 ▲0.0034.24 ▼4.5330.39 ▼5.22
Add New Post /wp-admin/post-new.php1,529 ▲322.84 ▼0.20600.15 ▲6.0575.34 ▲11.44
Media Library /wp-admin/upload.php1,398 ▲44.22 ▼0.04101.12 ▼7.1141.44 ▼2.92
Famous Birthdays /wp-admin/options-general.php?page=fambday1,2912.6372.9130.61

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_famous_birthdays

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function FAMBDAY_get_instance() in wp-content/plugins/famous-birthdays/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/famous-birthdays/hooks.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/famous-birthdays/FamousBirthdaysWidget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function FAMBDAY_get_instance() in wp-content/plugins/famous-birthdays/widget-template.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 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
4 plugin tags: birthdays, famous, birthday, stars

famous-birthdays/famous-birthdays.php Passed 13 tests

The primary PHP file in "Famous Birthday Plugin" version 1.0.0 is used by WordPress to initiate all plugin functionality
95 characters long description:
Place a widget and/or shortcode to display three famous birthdays that fall on the current day.

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 plugin384 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP67517343
CSS13036
JavaScript1205

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity15.67
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.91
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods23
▷ Static methods1878.26%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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