90% bp-default-user-notifications

Code Review | BP default user noifications

WordPress plugin BP default user noifications scored90%from 54 tests.

About plugin

  • Plugin page: bp-default-user-n...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.1
  • WordPress version: 6.3.1
  • First release: Aug 31, 2018
  • Latest release: Aug 31, 2018
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: utan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /837 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by BP default user noifications
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.22 ▼4.40
Dashboard /wp-admin3.34 ▲0.0454.53 ▲0.52
Posts /wp-admin/edit.php3.39 ▲0.0449.38 ▼2.36
Add New Post /wp-admin/post-new.php5.94 ▲0.0689.18 ▼8.67
Media Library /wp-admin/upload.php3.26 ▲0.0440.59 ▼2.17

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for BP default user noifications
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5114.53 ▲0.011.97 ▲0.0642.57 ▼4.82
Dashboard /wp-admin2,218 ▲475.56 ▲0.0286.26 ▼15.5738.02 ▼5.61
Posts /wp-admin/edit.php2,123 ▲232.00 ▼0.0340.96 ▼1.5434.55 ▼0.97
Add New Post /wp-admin/post-new.php1,546 ▲2023.01 ▼0.02700.67 ▼11.1963.34 ▲0.60
Media Library /wp-admin/upload.php1,423 ▲204.26 ▲0.0999.21 ▲0.4244.37 ▼2.90

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Contributors: Contributors not specified
Please take inspiration from this readme.txt

bp-default-user-notifications/bp-default-user-notifications.php Passed 13 tests

"BP default user noifications" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
133 characters long description:
Change default email notification settings for users, overrides current settings, save default email notification after registering..

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
No dangerous file extensions were detected415 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP47130199
CSS1235140
JavaScript156376

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods350.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
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
There are no PNG files in this plugin