83% cb-change-mail-sender

Code Review | Change Mail Sender

WordPress plugin Change Mail Sender scored83%from 54 tests.

About plugin

  • Plugin page: cb-change-mail-se...
  • Plugin version: 1.3.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1
  • WordPress version: 6.3.1
  • First release: Oct 9, 2015
  • Latest release: Mar 15, 2023
  • Number of updates: 36
  • Update frequency: every 75.4 days
  • Top authors: hmbashar (97.22%)capuderg (5.56%)

Code review

54 tests

User reviews

18 reviews

Install metrics

30,000+ active /161,793 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.26MB] [CPU: ▼3.75ms] Passed 4 tests

An overview of server-side resources used by Change Mail Sender
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.49 ▲0.86
Dashboard /wp-admin3.67 ▲0.3747.99 ▲3.74
Posts /wp-admin/edit.php3.72 ▲0.3746.45 ▲1.57
Add New Post /wp-admin/post-new.php6.19 ▲0.3082.31 ▼21.17
Media Library /wp-admin/upload.php3.53 ▲0.3135.58 ▲4.50
SMTP /wp-admin/admin.php?page=cb_mail_sender&tab=smtp3.5132.82
Settings /wp-admin/admin.php?page=cb_mail_sender3.5335.28

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 56 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Change Mail Sender
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8114.74 ▲0.311.87 ▼0.0543.04 ▲0.86
Dashboard /wp-admin2,236 ▲445.85 ▲0.94101.14 ▼7.0139.56 ▼3.90
Posts /wp-admin/edit.php2,113 ▲242.01 ▲0.0135.44 ▼1.0134.98 ▲2.17
Add New Post /wp-admin/post-new.php1,555 ▲2223.12 ▼0.10653.24 ▲34.9848.99 ▼9.39
Media Library /wp-admin/upload.php1,415 ▲244.24 ▼0.0896.13 ▼2.9144.10 ▲0.37
SMTP /wp-admin/admin.php?page=cb_mail_sender&tab=smtp9761.6924.5842.27
Settings /wp-admin/admin.php?page=cb_mail_sender1,0571.7125.1032.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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 fix the following
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-upgrader-skin.php): failed to open stream: No such file or directory in wp-content/plugins/cb-change-mail-sender/src/Helpers/PluginSilentUpgraderSkin.php on line 6
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-upgrader.php' (include_path='.:/usr/share/php') in wp-content/plugins/cb-change-mail-sender/src/Helpers/PluginSilentUpgrader.php on line 10
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-upgrader-skin.php' (include_path='.:/usr/share/php') in wp-content/plugins/cb-change-mail-sender/src/Helpers/PluginSilentUpgraderSkin.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'CBChangeMailSender\\Helpers\\PluginSilentUpgraderSkin' not found in wp-content/plugins/cb-change-mail-sender/src/Helpers/class-install-skin.php:10
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cb-change-mail-sender/src/Helpers/PluginSilentUpgrader.php on line 10
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cb-change-mail-sender/src/Helpers/PluginSilentUpgraderSkin.php on line 6
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-upgrader.php): failed to open stream: No such file or directory in wp-content/plugins/cb-change-mail-sender/src/Helpers/PluginSilentUpgrader.php on line 10

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 90% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
10 plugin tags: from name, email, mail, change name, change mail sender...

cb-change-mail-sender/index.php 77% from 13 tests

This is the main PHP file of "Change Mail Sender" version 1.3.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Requires PHP: Required version must be the same as the one declared in readme.txt ("5.6" instead of "5.6.20")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cb-change-mail-sender.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin2,854 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP184961,1201,649
CSS71471,026
JavaScript569117171
SVG8008

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity16.83
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity3.04
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods94
▷ Static methods66.38%
▷ Public methods7377.66%
▷ Protected methods00.00%
▷ Private methods2122.34%
Functions13
▷ Named functions1184.62%
▷ Anonymous functions215.38%
Constants7
▷ Global constants114.29%
▷ Class constants685.71%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
15 compressed PNG files occupy 0.46MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/prod-edu/product-education-bg@2x.png3.49KB3.49KB0.00%
assets/images/prod-edu/product-education-bg.png3.98KB3.98KB0.10%
assets/images/smtp/wpmailsmtp-logo@2x.png13.65KB8.91KB▼ 34.72%
assets/images/prod-edu/reports-thumbnail.png35.08KB36.68KB0.00%
assets/images/prod-edu/archive.png120.74KB126.80KB0.00%