84% lh-buddypress-default-email-notifications

Code Review | LH Buddypress Default Email Notifications

WordPress plugin LH Buddypress Default Email Notifications scored84%from 54 tests.

About plugin

  • Plugin page: lh-buddypress-def...
  • Plugin version: 1.00
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 6.3.1
  • First release: May 22, 2021
  • Latest release: May 22, 2021
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /432 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.03MB] [CPU: ▼4.51ms] Passed 4 tests

A check of server-side resources used by LH Buddypress Default Email Notifications
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.51 ▼4.03
Dashboard /wp-admin3.34 ▲0.0351.94 ▲1.41
Posts /wp-admin/edit.php3.39 ▲0.0348.59 ▼1.41
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.06 ▼9.10
Media Library /wp-admin/upload.php3.26 ▲0.0335.49 ▼3.51

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

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

Browser metrics Passed 4 tests

A check of browser resources used by LH Buddypress Default Email Notifications
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.36 ▲0.011.65 ▼0.2247.00 ▼3.96
Dashboard /wp-admin2,198 ▲245.57 ▼0.0186.43 ▼19.6342.71 ▼2.18
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0334.07 ▼7.0338.51 ▲2.12
Add New Post /wp-admin/post-new.php1,526 ▼022.92 ▼0.02626.82 ▼71.7451.52 ▼13.83
Media Library /wp-admin/upload.php1,403 ▲34.22 ▲0.02100.44 ▲0.7641.61 ▲0.41

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

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 | 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/lh-buddypress-default-email-notifications/partials/settings.php:1

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: control, default, notification, email, buddypress

lh-buddypress-default-email-notifications/lh-buddypress-default-email-notifications.php 92% from 13 tests

This is the main PHP file of "LH Buddypress Default Email Notifications" version 1.00, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin130 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP311722130

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods753.85%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
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 are no PNG files in this plugin