78% mail-debug-for-woocommerce

Code Review | Mail Debug for WooCommerce

WordPress plugin Mail Debug for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: mail-debug-for-wo...
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Jun 23, 2018
  • Latest release: Dec 24, 2022
  • Number of updates: 17
  • Update frequency: every 96.9 days
  • Top authors: leanzafrancesco (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /4,449 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.43ms] Passed 4 tests

Analyzing server-side resources used by Mail Debug for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0133.80 ▼9.69
Dashboard /wp-admin3.31 ▲0.0151.28 ▲3.89
Posts /wp-admin/edit.php3.36 ▲0.0048.13 ▲0.73
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.72 ▼9.85
Media Library /wp-admin/upload.php3.23 ▲0.0034.13 ▲1.09

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Mail Debug for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.22 ▼1.081.66 ▼0.4039.18 ▼4.99
Dashboard /wp-admin2,209 ▲244.86 ▼0.23110.84 ▲0.6942.33 ▼1.80
Posts /wp-admin/edit.php2,092 ▼02.06 ▲0.0538.69 ▼0.7635.22 ▼1.78
Add New Post /wp-admin/post-new.php1,542 ▼023.35 ▲5.17664.60 ▲20.4764.26 ▲2.30
Media Library /wp-admin/upload.php1,391 ▼04.27 ▲0.0996.90 ▼4.3241.75 ▼2.85

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/mail-debug-for-woocommerce/views/settings-end.php
    • > /wp-content/plugins/mail-debug-for-woocommerce/views/preview-box.php
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/mail-debug-for-woocommerce/init.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/mail-debug-for-woocommerce/views/settings-start.php:2
    • > PHP Warning
      Use of undefined constant MDWC_VIEWS_PATH - assumed 'MDWC_VIEWS_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mail-debug-for-woocommerce/views/settings.php on line 4
    • > PHP Warning
      require(MDWC_VIEWS_PATHsettings-start.php): failed to open stream: No such file or directory in wp-content/plugins/mail-debug-for-woocommerce/views/settings.php on line 4
    • > PHP Fatal error
      require(): Failed opening required 'MDWC_VIEWS_PATHsettings-start.php' (include_path='.:/usr/share/php') in wp-content/plugins/mail-debug-for-woocommerce/views/settings.php on line 4

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: woocommerce email, debug, mail debug, email, woocommerce debug

mail-debug-for-woocommerce/init.php 85% from 13 tests

The main PHP file in "Mail Debug for WooCommerce" ver. 1.3.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.0" instead of "4.0")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mail-debug-for-woocommerce.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,020 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP914586702
CSS1426205
JavaScript4162113

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity24.00
▷ Minimum class complexity11.00
▷ Maximum class complexity55.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods40
▷ Static methods410.00%
▷ Public methods3485.00%
▷ Protected methods00.00%
▷ Private methods615.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin