84% you-have-a-new-message

Code Review | You Have a New (BuddyPress) Message

WordPress plugin You Have a New (BuddyPress) Message scored84%from 54 tests.

About plugin

  • Plugin page: you-have-a-new-me...
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.0
  • WordPress version: 6.3.1
  • First release: Mar 12, 2015
  • Latest release: Dec 31, 2018
  • Number of updates: 16
  • Update frequency: every 86.9 days
  • Top authors: mechter (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /10,874 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼10.76ms] Passed 4 tests

This is a short check of server-side resources used by You Have a New (BuddyPress) Message
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.75 ▼1.34
Dashboard /wp-admin3.31 ▼0.0345.78 ▼13.89
Posts /wp-admin/edit.php3.36 ▲0.0144.01 ▼2.29
Add New Post /wp-admin/post-new.php5.89 ▲0.0176.91 ▼25.51
Media Library /wp-admin/upload.php3.24 ▲0.0136.10 ▲1.83

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_you-have-a-new-message-widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for You Have a New (BuddyPress) Message
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.19 ▼1.371.61 ▼0.0338.77 ▼2.85
Dashboard /wp-admin2,206 ▲215.83 ▲0.9397.73 ▼5.2137.86 ▼3.33
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0135.25 ▼0.0931.48 ▲1.06
Add New Post /wp-admin/post-new.php1,542 ▲523.32 ▼0.12668.23 ▲5.8370.40 ▼4.16
Media Library /wp-admin/upload.php1,385 ▼64.18 ▼0.03103.76 ▲7.5744.19 ▲0.08

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_you-have-a-new-message-widget
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/you-have-a-new-message/you-have-a-new-message.php:14

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

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
5 plugin tags: shortcode, message, buddypress, widget, notification

you-have-a-new-message/you-have-a-new-message.php Passed 13 tests

Analyzing the main PHP file in "You Have a New (BuddyPress) Message" version 2.1
55 characters long description:
Widget and Shortcode to notify users about new messages

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
Good job! No executable or dangerous file extensions detected101 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1191174
PO File171127

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
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
No PNG images were found in this plugin