78% mailshogun

Code Review | mailshogun

WordPress plugin mailshogun scored 78% from 54 tests.

About plugin

  • Plugin page: mailshogun
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.0.3
  • WordPress version: 6.3.1
  • First release: Feb 26, 2019
  • Latest release: Jul 3, 2019
  • Number of updates: 22
  • Update frequency: every 5.8 days
  • Top authors: nickpp (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active / 702 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
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.42ms] Passed 4 tests

An overview of server-side resources used by mailshogun
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.65 ▲0.04
Dashboard /wp-admin3.35 ▲0.0545.93 ▼7.19
Posts /wp-admin/edit.php3.47 ▲0.1148.01 ▲0.06
Add New Post /wp-admin/post-new.php5.95 ▲0.0796.63 ▼2.60
Media Library /wp-admin/upload.php3.28 ▲0.0539.30 ▲3.98
Mailshogun /wp-admin/options-general.php?page=mailshogun-unique-identifier3.2731.68

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for mailshogun
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲18113.60 ▼0.867.83 ▲6.1937.71 ▼4.83
Dashboard /wp-admin2,208 ▲235.88 ▼0.02105.32 ▼3.1241.43 ▼0.26
Posts /wp-admin/edit.php2,097 ▲82.01 ▼0.0436.78 ▲0.0632.66 ▼0.08
Add New Post /wp-admin/post-new.php1,530 ▼323.08 ▲0.01602.49 ▼57.1987.08 ▲20.47
Media Library /wp-admin/upload.php1,399 ▲114.19 ▼0.03100.20 ▼4.8242.13 ▼3.69
Mailshogun /wp-admin/options-general.php?page=mailshogun-unique-identifier1,0272.3430.8458.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/mailshogun/admin/partials/mailshogun-admin-display.php
    • > /wp-content/plugins/mailshogun/public/partials/mailshogun-public-display.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/mailshogun/views/mailshogun-template.php:2

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: Screenshot #2 (This is the second screen shot) image not found
  • Donate link: Please fix this invalid url: ""
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === mailshogun === )
The official readme.txt is a good inspiration

mailshogun/mailshogun.php Passed 13 tests

The main PHP script in "mailshogun" version 1.0.0 is automatically included on every request by WordPress
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin580 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP14186570444
JavaScript5338694
CSS3132542

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/new-log-very-small.png3.95KB0.71KB▼ 81.95%
public/img/new-log-small.png3.70KB0.56KB▼ 84.99%
public/img/logo24.png4.60KB1.08KB▼ 76.47%