10% brozzme-multiple-admin-emails

Code Review | Brozzme Multiple admin emails

WordPress plugin Brozzme Multiple admin emails scored10%from 54 tests.

About plugin

  • Plugin page: brozzme-multiple-...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.0
  • WordPress version: 6.3.1
  • First release: Nov 10, 2015
  • Latest release: Aug 29, 2022
  • Number of updates: 81
  • Update frequency: every 30.7 days
  • Top authors: Benoti (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /6,175 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/brozzme-multiple-admin-emails/multiple-admin-emails.php+73
    Undefined property: wp_bmae::$plugin_slug

Server metrics [RAM: ▼1.84MB] [CPU: ▼56.93ms] Passed 4 tests

Server-side resources used by Brozzme Multiple admin emails
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.77 ▲0.33
Dashboard /wp-admin2.11 ▼1.237.47 ▼54.84
Posts /wp-admin/edit.php2.11 ▼1.245.92 ▼46.71
Add New Post /wp-admin/post-new.php2.11 ▼3.776.82 ▼94.80
Media Library /wp-admin/upload.php2.11 ▼1.125.69 ▼31.35
Brozzme /wp-admin/admin.php?page=brozzme-plugins2.116.38
Notifications /wp-admin/admin.php?page=brozzme-multiple-admin-emails2.118.17

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Brozzme Multiple admin emails
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5114.24 ▼0.121.92 ▲0.1844.47 ▲0.44
Dashboard /wp-admin2,215 ▲405.55 ▼0.1288.34 ▼13.3040.84 ▼6.35
Posts /wp-admin/edit.php2,126 ▲261.97 ▼0.0534.32 ▼1.6937.61 ▼2.28
Add New Post /wp-admin/post-new.php1,553 ▲2718.19 ▼5.09614.33 ▼66.6366.68 ▲13.00
Media Library /wp-admin/upload.php1,423 ▲204.19 ▼0.03104.39 ▲5.5046.76 ▲0.20
Brozzme /wp-admin/admin.php?page=brozzme-plugins1,1312.1623.4547.04
Notifications /wp-admin/admin.php?page=brozzme-multiple-admin-emails9711.9927.1128.73

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/brozzme-multiple-admin-emails/multiple-admin-emails.php+73
    Undefined property: wp_bmae::$plugin_slug
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=brozzme-multiple-admin-emails
    • > Notice in wp-content/plugins/brozzme-multiple-admin-emails/multiple-admin-emails.php+73
    Undefined property: wp_bmae::$plugin_slug
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=brozzme-multiple-admin-emails
    • > Notice in wp-content/plugins/brozzme-multiple-admin-emails/admin/bmae_admin.php+136
    Undefined index: send_post_type
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=brozzme-multiple-admin-emails
    • > Notice in wp-content/plugins/brozzme-multiple-admin-emails/admin/bmae_admin.php+157
    Undefined index: event_email
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=brozzme-multiple-admin-emails
    • > Notice in wp-content/plugins/brozzme-multiple-admin-emails/admin/bmae_admin.php+171
    Undefined index: silent_mode

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/brozzme-multiple-admin-emails/admin/bmae_utilities.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/brozzme-multiple-admin-emails/multiple-admin-emails.php:261

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt might help

brozzme-multiple-admin-emails/multiple-admin-emails.php 77% from 13 tests

"Brozzme Multiple admin emails" version 1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("brozzme-multiple-admin-emails.php" instead of "multiple-admin-emails.php")
  • Description: The description should be shorter than 140 characters (currently 302 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin976 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4223215758
CSS1225218

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity23.75
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods49
▷ Static methods36.12%
▷ Public methods49100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants9
▷ Global constants9100.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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/logo-wps-200x200px.png30.17KB7.41KB▼ 75.43%