10% member-mailbox

Code Review | WP Promo Emails

WordPress plugin WP Promo Emails scored10%from 54 tests.

About plugin

  • Plugin page: member-mailbox
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2
  • WordPress version: 6.3.1
  • First release: Nov 23, 2014
  • Latest release: Jul 10, 2015
  • Number of updates: 66
  • Update frequency: every 3.5 days
  • Top authors: cbfreeman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /8,988 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
  • The plugin did not install without errors
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

Server metrics [RAM: ▼0.91MB] [CPU: ▼33.95ms] Passed 4 tests

This is a short check of server-side resources used by WP Promo Emails
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0434.40 ▼4.57
Dashboard /wp-admin3.03 ▼0.2722.34 ▼29.20
Posts /wp-admin/edit.php3.03 ▼0.3225.92 ▼19.85
Add New Post /wp-admin/post-new.php3.03 ▼2.8520.80 ▼75.36
Media Library /wp-admin/upload.php3.03 ▼0.1923.02 ▼11.38
Mailbox /wp-admin/admin.php?page=mmail_options3.0319.22
Archive Messages /wp-admin/admin.php?page=archive3.0323.46
Notifications /wp-admin/admin.php?page=notify3.0323.32
Trash /wp-admin/admin.php?page=trash3.0323.20
New Messages /wp-admin/admin.php?page=compose3.0323.31
Sent Messages /wp-admin/admin.php?page=sent3.0322.03

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: 2 new tables, 7 new options
New tables
wp_membermailbox
wp_membermailboxrecords
New WordPress options
widget_recent-posts
recovery_mode_email_last_sent
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Promo Emails
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲7213.19 ▼1.212.02 ▼0.1439.27 ▼4.56
Dashboard /wp-admin2,246 ▲585.86 ▲0.98113.19 ▼6.6843.10 ▼0.50
Posts /wp-admin/edit.php2,132 ▲431.98 ▼0.0741.31 ▲5.6136.55 ▲1.09
Add New Post /wp-admin/post-new.php1,567 ▲5323.12 ▲5.46638.54 ▼40.0659.52 ▲8.38
Media Library /wp-admin/upload.php1,431 ▲434.21 ▲0.0594.11 ▼5.2839.26 ▼6.80
Mailbox /wp-admin/admin.php?page=mmail_options8412.0328.1731.44
Archive Messages /wp-admin/admin.php?page=archive7171.536.6621.06
Notifications /wp-admin/admin.php?page=notify8372.0624.9625.18
Trash /wp-admin/admin.php?page=trash7171.146.8421.13
New Messages /wp-admin/admin.php?page=compose9182.0626.3027.39
Sent Messages /wp-admin/admin.php?page=sent8242.0623.9422.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function add_menu_page was called incorrectly. The seventh parameter passed to add_menu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.)
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

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)
Almost there, just fix the following server-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sent
    • > User notice in wp-includes/functions.php+5905
    Function add_menu_page was called incorrectly. The seventh parameter passed to add_menu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 6.0.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sent
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
    • > GET request to /wp-admin/admin.php?page=archive
    • > Warning in wp-content/plugins/member-mailbox/mmail.php+422
    require(archive.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=archive
    • > Compile error in wp-content/plugins/member-mailbox/mmail.php+422
    require(): Failed opening required 'archive.php' (include_path='.:/usr/share/php')
    • > GET request to /wp-admin/admin.php?page=trash
    • > Warning in wp-content/plugins/member-mailbox/mmail.php+434
    require(trash.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=trash
    • > Compile error in wp-content/plugins/member-mailbox/mmail.php+434
    require(): Failed opening required 'trash.php' (include_path='.:/usr/share/php')
    • > GET request to /wp-admin/admin.php?page=compose
    • > Notice in wp-content/plugins/member-mailbox/compose.php+31
    Undefined variable: mailto
    • > GET request to /wp-admin/admin.php?page=compose
    • > Notice in wp-content/plugins/member-mailbox/compose.php+32
    Undefined variable: subject_mail
    • > GET request to /wp-admin/admin.php?page=compose
    • > Notice in wp-content/plugins/member-mailbox/compose.php+33
    Undefined variable: template

SRP 50% from 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
Please fix the following items
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/member-mailbox/reply.php:5
    • > PHP Notice
      Trying to get property 'display_name' of non-object in wp-content/plugins/member-mailbox/view.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/member-mailbox/compose.php:14
    • > PHP Notice
      Trying to get property 'user_email' of non-object in wp-content/plugins/member-mailbox/view.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/member-mailbox/sent.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/member-mailbox/mmail-options.php:2
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/member-mailbox/view.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/member-mailbox/notify.php:2
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/member-mailbox/view.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (The default settings page provided with WP Promo eMails. Tested on many email clients like Gmail, Yahoo!, Live/Hotmail, etc.), #2 (Sample email is provided with WP Promo eMails.), #3 (Sample Dashboard section is provided with WP Promo eMails.), #4 (Send to All or Select Users section is provided with WP Promo eMails.)
The official readme.txt might help

member-mailbox/mmail.php 92% from 13 tests

The main file in "WP Promo Emails" v. 2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("member-mailbox.php" instead of "mmail.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected764 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP8191166688
JavaScript19449
CSS10027

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity1.44
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
5 PNG files occupy 0.17MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png81.53KB31.14KB▼ 61.81%
mailbox.png0.31KB0.38KB0.00%
screenshot-2.png27.40KB12.67KB▼ 53.77%
screenshot-4.png32.97KB13.29KB▼ 59.69%
screenshot-3.png33.59KB14.59KB▼ 56.58%