10% simplemailer

Code Review | SimpleMailer Contact Form

WordPress plugin SimpleMailer Contact Form scored 10% from 54 tests.

About plugin

  • Plugin page: simplemailer
  • Plugin version: 0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.2
  • WordPress version: 6.3.1
  • First release: Oct 17, 2017
  • Latest release: Oct 17, 2017
  • Number of updates: 13
  • Update frequency: every 0.2 days
  • Top authors: bigin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 606 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin cannot be installed
    • > User deprecated in wp-includes/functions.php+5643
    File class-phpmailer.php is deprecated since version 5.5.0! Use wp-includes/PHPMailer/PHPMailer.php instead. The PHPMailer class has been moved to wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace.

Server metrics [RAM: ▼1.59MB] [CPU: ▼52.04ms] Passed 4 tests

This is a short check of server-side resources used by SimpleMailer Contact Form
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.40 ▼1.066.37 ▼33.52
Dashboard /wp-admin2.42 ▼0.889.65 ▼41.55
Posts /wp-admin/edit.php2.42 ▼0.946.52 ▼41.77
Add New Post /wp-admin/post-new.php2.42 ▼3.478.01 ▼91.31
Media Library /wp-admin/upload.php2.42 ▼0.817.85 ▼26.38
SimpleMailer /wp-admin/options-general.php?page=sm2.426.54

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 22 new files
Database: 1 new table, 7 new options
New tables
wp_simplemailer
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_simplemailerwidget
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by SimpleMailer Contact Form
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲10114.01 ▼0.3615.16 ▲13.5943.98 ▲3.67
Dashboard /wp-admin2,208 ▲204.85 ▼0.0398.49 ▼3.7438.76 ▼1.48
Posts /wp-admin/edit.php2,097 ▲52.00 ▼0.0035.92 ▼6.3831.24 ▼5.66
Add New Post /wp-admin/post-new.php1,536 ▲821.82 ▲3.71669.48 ▲58.8361.22 ▼3.81
Media Library /wp-admin/upload.php1,396 ▲114.23 ▼0.19104.28 ▲3.4845.00 ▲1.84
SimpleMailer /wp-admin/options-general.php?page=sm1,2202.0325.2334.72

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5643
    File class-phpmailer.php is deprecated since version 5.5.0! Use wp-includes/PHPMailer/PHPMailer.php instead. The PHPMailer class has been moved to wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace.
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_simplemailerwidget
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=sm
    • > User deprecated in wp-includes/functions.php+5643
    File class-phpmailer.php is deprecated since version 5.5.0! Use wp-includes/PHPMailer/PHPMailer.php instead. The PHPMailer class has been moved to wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace.

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
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/simplemailer/custom.config.php
    • > /wp-content/plugins/simplemailer/simplemailer.php
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      include(ABSPATHwp-includes/class-phpmailer.php): failed to open stream: No such file or directory in wp-content/plugins/simplemailer/SimpleMailerMailer.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'PHPMailer' not found in wp-content/plugins/simplemailer/SimpleMailerMailer.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'PHPMailer' not found in wp-content/plugins/simplemailer/SimpleMailerMailer.php:4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/simplemailer/SimpleMailerMailer.php on line 2
    • > PHP Warning
      include(ABSPATHwp-includes/class-phpmailer.php): failed to open stream: No such file or directory in wp-content/plugins/simplemailer/SimpleMailerMailer.php on line 2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/simplemailer/SimpleMailerMailer.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simplemailer/SimpleMailerWidget.php:3
    • > PHP Warning
      include(): Failed opening 'ABSPATHwp-includes/class-phpmailer.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/simplemailer/SimpleMailerMailer.php on line 2
    • > PHP Warning
      include(): Failed opening 'ABSPATHwp-includes/class-phpmailer.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/simplemailer/SimpleMailerMailer.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: A description for screenshot #2 is missing in simplemailer/assets to your readme.txt
Please take inspiration from this readme.txt

simplemailer/simplemailer.php Passed 13 tests

The main PHP file in "SimpleMailer Contact Form" ver. 0.9 adds more information about the plugin and also serves as the entry point for this plugin
34 characters long description:
SimpleMailer - Contact form plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected2,610 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP113919422,136
PO File1109119271
Sass116092
CSS213086
SVG20225

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity32.19
▷ Minimum class complexity1.00
▷ Maximum class complexity226.00
Average method complexity5.71
▷ Minimum method complexity1.00
▷ Maximum method complexity61.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods106
▷ Static methods32.83%
▷ Public methods10094.34%
▷ Protected methods65.66%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/tr_bg.png14.71KB0.09KB▼ 99.36%