73% wpmail-pro

Code Review | WP Mail Pro

WordPress plugin WP Mail Pro scored73%from 54 tests.

About plugin

  • Plugin page: wpmail-pro
  • Plugin version: 2.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.8
  • WordPress version: 6.3.1
  • First release: Jun 27, 2021
  • Latest release: Jul 23, 2021
  • Number of updates: 6
  • Update frequency: every 6.5 days
  • Top authors: wpmailpro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,153 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.36MB] [CPU: ▼1.63ms] Passed 4 tests

This is a short check of server-side resources used by WP Mail Pro
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3745.11 ▲8.43
Dashboard /wp-admin3.67 ▲0.3352.87 ▼8.65
Posts /wp-admin/edit.php3.72 ▲0.3751.22 ▲1.33
Add New Post /wp-admin/post-new.php6.26 ▲0.3792.04 ▼7.62
Media Library /wp-admin/upload.php3.59 ▲0.3742.62 ▲10.76
Logs /wp-admin/admin.php?page=wpmailpro&tab=logs3.5943.25
WP Mail Pro /wp-admin/admin.php?page=wpmailpro3.5943.41
Settings /wp-admin/admin.php?page=wpmailpro&tab=settings3.5941.04
Metrics /wp-admin/admin.php?page=wpmailpro&tab=metrics3.5943.48
/wp-admin/admin.php?page=wpmailpro-preview-email3.5941.23
DNS Configuration /wp-admin/admin.php?page=wpmailpro&tab=dns3.5941.62
Scheduled Actions /wp-admin/tools.php?page=action-scheduler3.7451.14

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 162 new files
Database: 5 new tables, 10 new options
New tables
wp_actionscheduler_groups
wp_wpmp_emails
wp_actionscheduler_claims
wp_actionscheduler_actions
wp_actionscheduler_logs
New WordPress options
action_scheduler_hybrid_store_demarkation
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
action_scheduler_lock_async-request-runner
theysaidso_admin_options
widget_recent-posts
schema-ActionScheduler_LoggerSchema
db_upgraded
schema-ActionScheduler_StoreSchema

Browser metrics Passed 4 tests

WP Mail Pro: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲17413.25 ▼1.332.12 ▲0.3846.37 ▲7.19
Dashboard /wp-admin2,281 ▲935.87 ▲0.0596.30 ▼10.9337.91 ▼6.59
Posts /wp-admin/edit.php2,163 ▲712.03 ▼0.0035.02 ▼6.0629.77 ▼7.37
Add New Post /wp-admin/post-new.php1,572 ▲3417.66 ▼5.35641.94 ▼10.9552.87 ▲2.48
Media Library /wp-admin/upload.php1,463 ▲754.22 ▲0.0197.74 ▲1.2242.81 ▲0.71
Logs /wp-admin/admin.php?page=wpmailpro&tab=logs1,3227.14165.07134.41
WP Mail Pro /wp-admin/admin.php?page=wpmailpro9736.66119.0845.19
Settings /wp-admin/admin.php?page=wpmailpro&tab=settings1,0986.18136.1561.65
Metrics /wp-admin/admin.php?page=wpmailpro&tab=metrics9786.70123.6348.21
/wp-admin/admin.php?page=wpmailpro-preview-email7645.3986.5410.46
DNS Configuration /wp-admin/admin.php?page=wpmailpro&tab=dns1,0046.84125.3144.85
Scheduled Actions /wp-admin/tools.php?page=action-scheduler1,3151.8523.4731.10

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure failed, leaving 4 tables in the database
    • wp_actionscheduler_actions
    • wp_actionscheduler_claims
    • wp_actionscheduler_groups
    • wp_actionscheduler_logs
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • action_scheduler_lock_async-request-runner
    • schema-ActionScheduler_LoggerSchema
    • action_scheduler_hybrid_store_demarkation
    • widget_recent-posts
    • schema-ActionScheduler_StoreSchema
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 47× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/wpmail-pro/vendor/wpackio/enqueue/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/wpmail-pro/vendor/wpackio/enqueue/tests/bootstrap.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_SimpleSchedule' not found in wp-content/plugins/wpmail-pro/includes/libraries/action-scheduler/classes/schedules/ActionScheduler_NullSchedule.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'ActionScheduler_Exception' not found in wp-content/plugins/wpmail-pro/includes/libraries/action-scheduler/classes/ActionScheduler_InvalidActionException.php:10
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wpmail-pro/includes/libraries/action-scheduler/classes/abstracts/ActionScheduler_Abstract_ListTable.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/wpmail-pro/includes/libraries/action-scheduler/classes/WP_CLI/ActionScheduler_WPCLI_Scheduler_command.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Logger' not found in wp-content/plugins/wpmail-pro/includes/libraries/action-scheduler/classes/data-stores/ActionScheduler_wpCommentLogger.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Abstract_RecurringSchedule' not found in wp-content/plugins/wpmail-pro/includes/libraries/action-scheduler/classes/schedules/ActionScheduler_CronSchedule.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Action' not found in wp-content/plugins/wpmail-pro/includes/libraries/action-scheduler/classes/actions/ActionScheduler_NullAction.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'CronExpression_AbstractField' not found in wp-content/plugins/wpmail-pro/includes/libraries/action-scheduler/lib/cron-expression/CronExpression_MonthField.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/wpmail-pro/includes/libraries/action-scheduler/classes/WP_CLI/Migration_Command.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: wpmailpro, smtp, deliverability, email, mail

wpmail-pro/wp-mail-pro.php 77% from 13 tests

The main PHP file in "WP Mail Pro" ver. 2.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • 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
  • Main file name: Name the main plugin file the same as the plugin slug ("wpmail-pro.php" instead of "wp-mail-pro.php")
  • Domain Path: The domain path is invalid: folder "/languages/" does not exist

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
There were no executable files found in this plugin9,807 lines of code in 148 files:
LanguageFilesBlank linesComment linesLines of code
PHP1292,3765,8169,202
Markdown51360271
JSON600223
XML29396
JavaScript5012814
CSS11181

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity10.72
▷ Minimum class complexity1.00
▷ Maximum class complexity85.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces19
Interfaces3
Traits0
Classes98
▷ Abstract classes1616.33%
▷ Concrete classes8283.67%
▷ Final classes00.00%
Methods728
▷ Static methods8111.13%
▷ Public methods54675.00%
▷ Protected methods16122.12%
▷ Private methods212.88%
Functions90
▷ Named functions8190.00%
▷ Anonymous functions910.00%
Constants47
▷ Global constants817.02%
▷ Class constants3982.98%
▷ Public constants39100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin