84% bp-birthday-greetings

Code Review | BP Birthday Greetings

WordPress plugin BP Birthday Greetings scored84%from 54 tests.

About plugin

  • Plugin page: bp-birthday-greet...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Oct 11, 2018
  • Latest release: Feb 2, 2020
  • Number of updates: 14
  • Update frequency: every 34.2 days
  • Top authors: prashantvatsh (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

500+ active /14,481 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.77ms] Passed 4 tests

An overview of server-side resources used by BP Birthday Greetings
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.63 ▼2.98
Dashboard /wp-admin3.34 ▲0.0456.27 ▲7.89
Posts /wp-admin/edit.php3.39 ▲0.0452.18 ▲2.92
Add New Post /wp-admin/post-new.php5.92 ▲0.0486.05 ▼8.13
Media Library /wp-admin/upload.php3.27 ▲0.0437.55 ▲1.10

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for BP Birthday Greetings
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3314.35 ▲0.071.69 ▲0.1143.50 ▲0.83
Dashboard /wp-admin2,198 ▲215.62 ▲0.0591.11 ▼1.8940.19 ▲1.12
Posts /wp-admin/edit.php2,103 ▲32.11 ▲0.1339.78 ▲2.5437.03 ▼0.86
Add New Post /wp-admin/post-new.php1,529 ▲323.09 ▲0.03679.50 ▲11.3149.95 ▼4.37
Media Library /wp-admin/upload.php1,403 ▲34.23 ▲0.02111.57 ▲0.3647.71 ▼0.85

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% 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 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bp-birthday-greetings/bp-birthday-widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #3 (Birthday Widget), #4 (Listing With Member Avatar), #5 (New Settings)
Please take inspiration from this readme.txt

bp-birthday-greetings/loader.php 92% from 13 tests

This is the main PHP file of "BP Birthday Greetings" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("bp-birthday-greetings.php" instead of "loader.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected373 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP36262350
CSS11023

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions1593.75%
▷ Anonymous functions16.25%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.37MB with 0.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png79.23KB23.64KB▼ 70.16%
screenshot-3.png42.43KB14.71KB▼ 65.33%
screenshot-4.png65.78KB17.86KB▼ 72.85%
screenshot-1.png128.22KB41.25KB▼ 67.83%
screenshot-2.png66.92KB21.21KB▼ 68.30%