84% mail-grab

Code Review | Mail Grab

WordPress plugin Mail Grab scored84%from 54 tests.

About plugin

  • Plugin page: mail-grab
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.7.2
  • WordPress version: 6.3.1
  • First release: May 23, 2021
  • Latest release: May 23, 2021
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: m1r0 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /368 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

A check of server-side resources used by Mail Grab
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2542.13 ▲5.15
Dashboard /wp-admin3.61 ▲0.3147.37 ▼0.85
Posts /wp-admin/edit.php3.66 ▲0.3153.67 ▲5.24
Add New Post /wp-admin/post-new.php6.13 ▲0.2493.29 ▼3.63
Media Library /wp-admin/upload.php3.47 ▲0.2438.80 ▲2.60
All Emails /wp-admin/edit.php?post_type=mlgb_email3.5137.64
Settings /wp-admin/edit.php?post_type=mlgb_email&page=settings3.4636.35

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 221 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
mlgb_settings
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Mail Grab
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲8913.32 ▼1.061.73 ▲0.1643.58 ▲2.27
Dashboard /wp-admin2,230 ▲424.83 ▼1.07110.52 ▲11.1542.08 ▼2.03
Posts /wp-admin/edit.php2,113 ▲242.12 ▲0.1539.94 ▼1.0835.82 ▲1.48
Add New Post /wp-admin/post-new.php1,553 ▲3423.38 ▼0.28661.88 ▼16.7759.27 ▼4.37
Media Library /wp-admin/upload.php1,406 ▲184.24 ▼0.0299.94 ▼19.4043.83 ▼3.79
All Emails /wp-admin/edit.php?post_type=mlgb_email1,0872.0032.3027.86
Settings /wp-admin/edit.php?post_type=mlgb_email&page=settings1,0733.4450.4223.24

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 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • mlgb_settings
    • can_compress_scripts

Smoke tests 75% 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 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
  • 160× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/mail-grab/vendor/composer/installers/src/Composer/Installers/PrestashopInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\\Exception\\ParseException' not found in wp-content/plugins/mail-grab/vendor/symfony/css-selector/Exception/ExpressionErrorException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/mail-grab/vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' not found in wp-content/plugins/mail-grab/vendor/symfony/css-selector/Parser/Handler/StringHandler.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/mail-grab/vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/mail-grab/vendor/composer/installers/src/Composer/Installers/SyliusInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\\XPath\\Extension\\AbstractExtension' not found in wp-content/plugins/mail-grab/vendor/symfony/css-selector/XPath/Extension/FunctionExtension.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\CssSelector\ode\\AbstractNode' not found in wp-content/plugins/mail-grab/vendor/symfony/css-selector/Node/AttributeNode.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/mail-grab/vendor/composer/installers/src/Composer/Installers/TastyIgniterInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/mail-grab/vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4 in mail-grab/assets to your readme.txt
You can take inspiration from this readme.txt

mail-grab/mail-grab.php Passed 13 tests

The primary PHP file in "Mail Grab" version 1.0.0 is used by WordPress to initiate all plugin functionality
85 characters long description:
Debug WordPress emails with ease. Log all emails and disable email sending if needed.

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
There were no executable files found in this plugin8,311 lines of code in 214 files:
LanguageFilesBlank linesComment linesLines of code
PHP1991,7323,4787,281
JSON400469
HTML200356
YAML3303118
Markdown311045
XML23039
CSS1003

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity3.57
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity1.82
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces23
Interfaces6
Traits0
Classes185
▷ Abstract classes52.70%
▷ Concrete classes18097.30%
▷ Final classes21.11%
Methods579
▷ Static methods233.97%
▷ Public methods51088.08%
▷ Protected methods488.29%
▷ Private methods213.63%
Functions14
▷ Named functions214.29%
▷ Anonymous functions1285.71%
Constants20
▷ Global constants210.00%
▷ Class constants1890.00%
▷ Public constants18100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin