78% multiple-admin-emails

Code Review | Multiple Admin Emails

WordPress plugin Multiple Admin Emails scored 78% from 54 tests.

About plugin

  • Plugin page: multiple-admin-em...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.3.1
  • WordPress version: 6.3.1
  • First release: Nov 7, 2014
  • Latest release: Nov 26, 2015
  • Number of updates: 4
  • Update frequency: every 104.0 days
  • Top authors: svincoll4 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 1,942 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.88ms] Passed 4 tests

A check of server-side resources used by Multiple Admin Emails
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.79 ▼2.40
Dashboard /wp-admin3.33 ▲0.0244.20 ▼5.34
Posts /wp-admin/edit.php3.38 ▲0.0241.83 ▼5.27
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.57 ▼2.50
Media Library /wp-admin/upload.php3.25 ▲0.0236.42 ▲4.30
Multiple Admin Emails /wp-admin/options-general.php?page=multiple-admin-emails3.2234.79

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Multiple Admin Emails
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.21 ▼1.161.77 ▼0.0043.52 ▲0.10
Dashboard /wp-admin2,207 ▲195.79 ▲0.8898.06 ▼18.6841.58 ▼6.01
Posts /wp-admin/edit.php2,093 ▲72.02 ▲0.0234.18 ▼1.7532.59 ▼3.59
Add New Post /wp-admin/post-new.php1,536 ▼823.07 ▼0.10673.92 ▲19.6466.43 ▲7.08
Media Library /wp-admin/upload.php1,389 ▲14.25 ▼0.02132.90 ▲34.3448.81 ▲5.69
Multiple Admin Emails /wp-admin/options-general.php?page=multiple-admin-emails8802.0624.1327.97

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=multiple-admin-emails
    • > Notice in wp-content/plugins/multiple-admin-emails/admin-settings.php+63
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=multiple-admin-emails
    • > Notice in wp-content/plugins/multiple-admin-emails/admin-settings.php+82
    Undefined index: to
    • > GET request to /wp-admin/options-general.php?page=multiple-admin-emails
    • > Notice in wp-content/plugins/multiple-admin-emails/admin-settings.php+89
    Undefined index: subject
    • > GET request to /wp-admin/options-general.php?page=multiple-admin-emails
    • > Notice in wp-content/plugins/multiple-admin-emails/admin-settings.php+95
    Undefined index: message

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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/multiple-admin-emails/admin-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/multiple-admin-emails/multiple-admin-emails.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Admin)
You can take inspiration from this readme.txt

multiple-admin-emails/multiple-admin-emails.php Passed 13 tests

"Multiple Admin Emails" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
71 characters long description:
Allows to edit From Name, From Email, admin emails and send test emails

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected159 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2368159

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png75.92KB31.88KB▼ 58.00%