84% mailx

Code Review | MailX - Change Sender Name, Sender Address & Content Type of Your Emails

WordPress plugin MailX - Change Sender Name, Sender Address & Content Type of Your Emails scored 84% from 54 tests.

About plugin

  • Plugin page: mailx
  • Plugin version: 0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6
  • WordPress version: 5.8.1
  • First release: Aug 4, 2021
  • Latest release: Aug 4, 2021
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: mukto90 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 68 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by MailX - Change Sender Name, Sender Address & Content Type of Your Emails
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.93 ▲0.2137.06 ▲18.05
Dashboard /wp-admin3.40 ▲0.3434.53 ▼10.22
Posts /wp-admin/edit.php3.60 ▲0.4948.25 ▲8.76
Add New Post /wp-admin/post-new.php5.86 ▲0.4297.47 ▼553.87
Media Library /wp-admin/upload.php3.49 ▲0.4838.56 ▲1.51
MailX /wp-admin/tools.php?page=mailx3.5036.79

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 53 new files
Database: no new tables, 5 new options
New WordPress options
mailx_installed
mailx_version
mailx_install_time
codexpert-blog-json
_mailx_notices

Browser metrics Passed 4 tests

This is an overview of browser requirements for MailX - Change Sender Name, Sender Address & Content Type of Your Emails
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,766 ▲17015.95 ▲0.589.12 ▼0.3349.82 ▲1.63
Dashboard /wp-admin3,054 ▲1216.15 ▲0.22140.75 ▼18.11110.44 ▼6.98
Posts /wp-admin/edit.php2,754 ▲152.71 ▲0.0263.71 ▼4.0990.23 ▲5.73
Add New Post /wp-admin/post-new.php1,608 ▼6220.85 ▲1.70372.12 ▼2.05117.06 ▲7.74
Media Library /wp-admin/upload.php1,825 ▲155.13 ▲0.06154.34 ▲4.08115.27 ▼4.45
MailX /wp-admin/tools.php?page=mailx1,4234.4181.6292.09

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 5 options in the database
    • mailx_installed
    • codexpert-blog-json
    • _mailx_notices
    • mailx_install_time
    • mailx_version

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 no errors were found, this is by no means 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 take a closer look at the following
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'codexpert\\plugin\\Base' not found in wp-content/plugins/mailx/src/Settings.php:13
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/mailx/inc/functions.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mailx/inc/functions.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/mailx/inc/functions.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/mailx/inc/functions.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/mailx/inc/functions.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mailx/inc/functions.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: email name, wordpress email, email type, email content type, sender email

mailx/mailx.php 92% from 13 tests

The principal PHP file in "MailX - Change Sender Name, Sender Address & Content Type of Your Emails" v. 0.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")

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
There were no executable files found in this plugin3,720 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
PHP327957442,710
CSS620726
JavaScript5110213
JSON30070
Markdown1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity24.04
▷ Minimum class complexity1.00
▷ Maximum class complexity197.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes23
▷ Abstract classes28.70%
▷ Concrete classes2191.30%
▷ Final classes14.76%
Methods221
▷ Static methods114.98%
▷ Public methods21295.93%
▷ Protected methods20.90%
▷ Private methods73.17%
Functions7
▷ Named functions342.86%
▷ Anonymous functions457.14%
Constants5
▷ Global constants5100.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.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
vendor/codexpert/plugin/src/assets/img/survey.png7.31KB3.08KB▼ 57.88%