10% wp-promo-emails

Code Review | WP Promo Emails

WordPress plugin WP Promo Emails scored10%from 54 tests.

About plugin

  • Plugin page: wp-promo-emails
  • Plugin version: 6.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5
  • WordPress version: 6.3.1
  • First release: Oct 23, 2014
  • Latest release: Apr 4, 2016
  • Number of updates: 113
  • Update frequency: every 4.7 days
  • Top authors: cbfreeman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,820 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/wp-promo-emails/wppe.php+166
    Undefined index: member_0_0_0_0

Server metrics [RAM: ▼1.96MB] [CPU: ▼55.81ms] Passed 4 tests

An overview of server-side resources used by WP Promo Emails
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.20 ▼43.15
Dashboard /wp-admin2.05 ▼1.256.02 ▼46.78
Posts /wp-admin/edit.php2.05 ▼1.316.08 ▼43.38
Add New Post /wp-admin/post-new.php2.05 ▼3.845.08 ▼89.93
Media Library /wp-admin/upload.php2.05 ▼1.184.86 ▼32.66
WP Promo Emails /wp-admin/options-general.php?page=wppe_options2.055.36

Server storage [IO: ▲0.63MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 57 new files
Database: 2 new tables, 7 new options
New tables
wp_wppenewsletter
wp_wpperecords
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
wppe_options

Browser metrics Passed 4 tests

Checking browser requirements for WP Promo Emails
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲8714.35 ▼0.101.68 ▲0.0938.41 ▼5.19
Dashboard /wp-admin2,254 ▲775.69 ▲0.0987.49 ▼2.6940.03 ▼4.05
Posts /wp-admin/edit.php2,113 ▲131.98 ▼0.1144.38 ▲2.5933.84 ▼6.13
Add New Post /wp-admin/post-new.php1,535 ▲923.43 ▲0.14694.69 ▲8.9158.31 ▲7.77
Media Library /wp-admin/upload.php1,404 ▲44.27 ▲0.0298.14 ▲1.1344.34 ▼0.12
WP Promo Emails /wp-admin/options-general.php?page=wppe_options1,7507.88153.4476.47

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/wp-promo-emails/wppe.php+166
    Undefined index: member_0_0_0_0
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wppe_options
    • > Notice in wp-content/plugins/wp-promo-emails/wppe.php+166
    Undefined index: member_0_0_0_0
    • > GET request to /wp-admin/options-general.php?page=wppe_options
    • > Notice in wp-content/plugins/wp-promo-emails/wppe-options.php+166
    Undefined variable: nid2

SRP 0% 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
The following issues need your attention
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-promo-emails/unsubscribe/unsubscribe.php
    • > /wp-content/plugins/wp-promo-emails/records/success.php
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-promo-emails/wppe.php on line 43
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-promo-emails/wppe.php on line 41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-promo-emails/wppe-options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-promo-emails/templates/template-1.php:5
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-promo-emails/wppe.php on line 42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/wp-promo-emails/wppe.php:97

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
Attributes that require attention:
  • Screenshots: These screenshots do not have 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.)
Please take inspiration from this readme.txt

wp-promo-emails/wppe.php 92% from 13 tests

Analyzing the main PHP file in "WP Promo Emails" version 6.0
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-promo-emails.php" instead of "wppe.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected6,866 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript226204524,600
HTML10105101,113
PHP6157213658
CSS910310490
Markdown1105

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity1.95
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.28MB with 0.17MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png121.86KB41.75KB▼ 65.74%
screenshot-3.png22.97KB11.52KB▼ 49.86%
screenshot-2.png138.68KB39.35KB▼ 71.63%