10% wp-mailer

Code Review | WP Easy Post Mailer

WordPress plugin WP Easy Post Mailer scored 10% from 54 tests.

About plugin

  • Plugin page: wp-mailer
  • Plugin version: 0.64
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.6
  • WordPress version: 5.8.1
  • First release: May 29, 2015
  • Latest release: Aug 25, 2016
  • Number of updates: 21
  • Update frequency: every 21.7 days
  • Top authors: webfwd (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active / 6,242 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/wp-mailer/wpm.php+135
    Only variables should be passed by reference

Server metrics [RAM: ▼1.88MB] [CPU: ▼186.19ms] Passed 4 tests

An overview of server-side resources used by WP Easy Post Mailer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /1.75 ▼1.095.21 ▼28.87
Dashboard /wp-admin1.77 ▼1.295.81 ▼32.09
Posts /wp-admin/edit.php1.77 ▼1.345.51 ▼39.38
Add New Post /wp-admin/post-new.php1.77 ▼3.664.95 ▼644.42
Media Library /wp-admin/upload.php1.77 ▼1.235.78 ▼27.22
WP Mailer /wp-admin/admin.php?page=wp-mailer/tab-forms-addedit.php1.774.69
Subscribers /wp-admin/admin.php?page=wp-mailer/tab-subscribers.php1.775.31
Credits /wp-admin/admin.php?page=wp-mailer/tab-credits.php1.776.25
Import Export /wp-admin/admin.php?page=wp-mailer/tab-importexport.php1.775.46
Campaigns /wp-admin/admin.php?page=wp-mailer/tab-jobs.php1.774.55
Unsubscribed /wp-admin/admin.php?page=wp-mailer/tab-unsubscribed.php1.775.75
Settings /wp-admin/admin.php?page=wp-mailer/tab-settings.php1.775.17
Forms /wp-admin/admin.php?page=wp-mailer/tab-forms.php1.774.71
Templates /wp-admin/admin.php?page=wp-mailer/tab-templates.php1.775.75

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 31 new files
Database: 3 new tables, 9 new options
New tables
wp_wpm_forms
wp_wpm_jobs
wp_wpm_subscribers
New WordPress options
wpm_sendername
wpm_version
wpm_batchpause
wpm_mail_template
wpm_unsubscribemsg
wpm_batchsize
wpm_autosend
wpm_senderemail
widget_wpm_subscribe_widget

Browser metrics Passed 4 tests

Checking browser requirements for WP Easy Post Mailer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,742 ▲14615.95 ▲0.419.63 ▲0.3346.63 ▼2.05
Dashboard /wp-admin3,026 ▲955.91 ▼0.22132.53 ▼6.95136.28 ▲25.67
Posts /wp-admin/edit.php2,803 ▲642.60 ▼0.1062.13 ▼4.5894.12 ▲0.34
Add New Post /wp-admin/post-new.php1,540 ▼33618.56 ▼0.56358.19 ▼16.06109.78 ▲2.05
Media Library /wp-admin/upload.php1,814 ▲45.04 ▲0.02138.66 ▼10.34140.18 ▲8.46
WP Mailer /wp-admin/admin.php?page=wp-mailer/tab-forms-addedit.php1,4132.2452.5292.07
Subscribers /wp-admin/admin.php?page=wp-mailer/tab-subscribers.php1,3182.1053.9778.43
Credits /wp-admin/admin.php?page=wp-mailer/tab-credits.php1,2582.2154.5097.39
Import Export /wp-admin/admin.php?page=wp-mailer/tab-importexport.php1,1552.2255.6791.29
Campaigns /wp-admin/admin.php?page=wp-mailer/tab-jobs.php1,3302.0950.4574.20
Unsubscribed /wp-admin/admin.php?page=wp-mailer/tab-unsubscribed.php1,3032.0955.0771.90
Settings /wp-admin/admin.php?page=wp-mailer/tab-settings.php1,3772.1151.1293.65
Forms /wp-admin/admin.php?page=wp-mailer/tab-forms.php1,2812.1052.4470.23
Templates /wp-admin/admin.php?page=wp-mailer/tab-templates.php1,2722.1053.4075.49

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/wp-mailer/wpm.php+135
    Only variables should be passed by reference
  • Zombie tables were found after uninstall: 3 tables
    • wp_wpm_forms
    • wp_wpm_jobs
    • wp_wpm_subscribers
  • The uninstall procedure has failed, leaving 9 options in the database
    • wpm_autosend
    • wpm_batchsize
    • wpm_mail_template
    • wpm_batchpause
    • widget_wpm_subscribe_widget
    • wpm_sendername
    • wpm_version
    • wpm_senderemail
    • wpm_unsubscribemsg

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 27 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-mailer/tab-templates.php
    • > Notice in wp-content/plugins/wp-mailer/wpm.php+109
    Only variables should be passed by reference
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-mailer/tab-templates.php
    • > User deprecated in wp-includes/functions.php+5304
    The called constructor method for WP_Widget in WPM_Subscribe_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-mailer/tab-forms-addedit.php
    • > Notice in wp-content/plugins/wp-mailer/wpmh.php+11
    Undefined variable: current_tab
    • > GET request to /wp-admin/admin.php?page=wp-mailer/tab-forms-addedit.php
    • > Notice in wp-content/plugins/wp-mailer/tab-forms-addedit.php+50
    Undefined index: form_name
    • > GET request to /wp-admin/admin.php?page=wp-mailer/tab-forms-addedit.php
    • > Notice in wp-content/plugins/wp-mailer/tab-forms-addedit.php+51
    Undefined index: form_prepend
    • > GET request to /wp-admin/admin.php?page=wp-mailer/tab-forms-addedit.php
    • > Notice in wp-content/plugins/wp-mailer/tab-forms-addedit.php+52
    Undefined index: form_nameshow
    • > GET request to /wp-admin/admin.php?page=wp-mailer/tab-forms-addedit.php
    • > Notice in wp-content/plugins/wp-mailer/tab-forms-addedit.php+53
    Undefined index: form_namelbl
    • > GET request to /wp-admin/admin.php?page=wp-mailer/tab-forms-addedit.php
    • > Notice in wp-content/plugins/wp-mailer/tab-forms-addedit.php+54
    Undefined index: form_nameph
    • > GET request to /wp-admin/admin.php?page=wp-mailer/tab-forms-addedit.php
    • > Notice in wp-content/plugins/wp-mailer/tab-forms-addedit.php+55
    Undefined index: form_emaillbl
    • > GET request to /wp-admin/admin.php?page=wp-mailer/tab-forms-addedit.php
    • > Notice in wp-content/plugins/wp-mailer/tab-forms-addedit.php+56
    Undefined index: form_emailph
    • > GET request to /wp-admin/admin.php?page=wp-mailer/tab-forms-addedit.php
    • > Notice in wp-content/plugins/wp-mailer/tab-forms-addedit.php+57
    Undefined index: form_submitshow
    • > GET request to /wp-admin/admin.php?page=wp-mailer/tab-forms-addedit.php
    • > Notice in wp-content/plugins/wp-mailer/tab-forms-addedit.php+58
    Undefined index: form_submittxt
    • > GET request to /wp-admin/admin.php?page=wp-mailer/tab-forms-addedit.php
    • > Notice in wp-content/plugins/wp-mailer/tab-forms-addedit.php+59
    Undefined index: form_thankyou
    • > GET request to /wp-admin/admin.php?page=wp-mailer/tab-forms-addedit.php
    • > Notice in wp-content/plugins/wp-mailer/tab-forms-addedit.php+60
    Undefined index: form_thanksmsg
    • > GET request to /wp-admin/admin.php?page=wp-mailer/tab-forms-addedit.php
    • > Notice in wp-content/plugins/wp-mailer/tab-forms-addedit.php+68
    Trying to get property 'form_name' of non-object
    • > GET request to /wp-admin/admin.php?page=wp-mailer/tab-forms-addedit.php
    • > Warning in wp-content/plugins/wp-mailer/tab-forms-addedit.php+97
    Use of undefined constant form_layout - assumed 'form_layout' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=wp-mailer/tab-forms-addedit.php
    • > Notice in wp-content/plugins/wp-mailer/tab-forms-addedit.php+98
    Undefined variable: form_layout

SRP 0% 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
Almost there! Just fix the following items
  • 21× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/wp-mailer/mailer/job.php
    • > /wp-content/plugins/wp-mailer/wpmh.php
    • > /wp-content/plugins/wp-mailer/tab-unsubscribed.php
    • > /wp-content/plugins/wp-mailer/tab-subscribers.php
    • > /wp-content/plugins/wp-mailer/tab-credits.php
    • > /wp-content/plugins/wp-mailer/wpm-upgrade.php
    • > /wp-content/plugins/wp-mailer/mailer/template.php
    • > /wp-content/plugins/wp-mailer/mailer/cron.php
    • > /wp-content/plugins/wp-mailer/tab-templates.php
    • > /wp-content/plugins/wp-mailer/templates/wpm-responsivegreen.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-mailer/wpm.php:96
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-mailer/mailer/widget.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 33 tag instead of maximum 10
The official readme.txt might help

wp-mailer/wpm.php 92% from 13 tests

"WP Easy Post Mailer" version 0.64's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-mailer.php" instead of "wpm.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin2,342 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP254944762,342

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity20.67
▷ Minimum class complexity5.00
▷ Maximum class complexity56.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods69
▷ Static methods00.00%
▷ Public methods4768.12%
▷ Protected methods11.45%
▷ Private methods2130.43%
Functions48
▷ Named functions4491.67%
▷ Anonymous functions48.33%
Constants12
▷ Global constants325.00%
▷ Class constants975.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
templates/wpm-default.png7.59KB6.79KB▼ 10.49%
templates/wpm-responsivegreen.png5.69KB4.82KB▼ 15.19%
assets/wpm-admin-icon.png1.21KB0.29KB▼ 76.15%