79% yourchoice-mailpro

Code Review | YourChoice MailPro

WordPress plugin YourChoice MailPro scored79%from 54 tests.

About plugin

  • Plugin page: yourchoice-mailpro
  • Plugin version: 2.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.3
  • WordPress version: 6.3.1
  • First release: Apr 6, 2016
  • Latest release: Aug 9, 2023
  • Number of updates: 39
  • Update frequency: every 68.7 days
  • Top authors: yourchoice (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,465 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
Installer ran successfully

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

Server-side resources used by YourChoice MailPro
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0334.57 ▼6.76
Dashboard /wp-admin3.30 ▲0.0039.45 ▼9.83
Posts /wp-admin/edit.php3.38 ▲0.0347.51 ▲0.80
Add New Post /wp-admin/post-new.php5.91 ▲0.0383.73 ▼5.23
Media Library /wp-admin/upload.php3.25 ▲0.0333.76 ▲0.63
YourChoice MailPro /wp-admin/options-general.php?page=mailpro3.2728.68

Server storage [IO: ▲0.15MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 33 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_yourchoicemailprowidget

Browser metrics Passed 4 tests

A check of browser resources used by YourChoice MailPro
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,867 ▲13213.62 ▼1.131.75 ▼0.4239.12 ▼9.26
Dashboard /wp-admin2,248 ▲635.85 ▼0.05121.15 ▲7.4945.39 ▼1.59
Posts /wp-admin/edit.php2,093 ▲72.05 ▲0.0139.49 ▲2.7535.05 ▼1.16
Add New Post /wp-admin/post-new.php1,537 ▲323.31 ▲0.26639.51 ▼44.6660.53 ▲2.94
Media Library /wp-admin/upload.php1,395 ▲104.20 ▼0.05101.00 ▲1.6641.77 ▼2.15
YourChoice MailPro /wp-admin/options-general.php?page=mailpro7942.0327.2230.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_yourchoicemailprowidget
    • widget_recent-posts
    • widget_recent-comments

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)
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=mailpro
    • > Notice in wp-content/plugins/yourchoice-mailpro/yourchoice-mailpro.php+237
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/yourchoice-mailpro/classes/widget.php:11
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/yourchoice-mailpro/views/failure.tpl.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/yourchoice-mailpro/views/admin.tpl.php:2
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/yourchoice-mailpro/views/success.tpl.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yourchoice-mailpro/classes/dashboard-widget.php:44
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/yourchoice-mailpro/views/failure.tpl.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/yourchoice-mailpro/views/success.tpl.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/yourchoice-mailpro/views/admin_basic.tpl.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/yourchoice-mailpro/views/admin_recaptcha.tpl.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/yourchoice-mailpro/yourchoice-mailpro.php:36

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: subscribers, newsletter, yourchoice, mailpro

yourchoice-mailpro/yourchoice-mailpro.php Passed 13 tests

The principal PHP file in "YourChoice MailPro" v. 2.0.3 is loaded by WordPress automatically on each request
74 characters long description:
A MailPro API interface to add email addresses into a MailPro address book

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,760 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PO File83680987
PHP98247685
JavaScript35743
CSS111334
XML10011

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity19.00
▷ Minimum class complexity4.00
▷ Maximum class complexity34.00
Average method complexity5.50
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin