78% w2dc-mail

Code Review | W2DC Mail

WordPress plugin W2DC Mail scored 78% from 54 tests.

About plugin

  • Plugin page: w2dc-mail
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 11, 2021
  • Latest release: Jun 12, 2021
  • Number of updates: 7
  • Update frequency: every 0.3 days
  • Top authors: estampel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 253 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.14MB] [CPU: ▼9.29ms] Passed 4 tests

A check of server-side resources used by W2DC Mail
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▼0.6121.48 ▼21.50
Dashboard /wp-admin3.32 ▲0.0245.99 ▼3.55
Posts /wp-admin/edit.php3.38 ▲0.0248.31 ▲5.48
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.20 ▼12.70
Media Library /wp-admin/upload.php3.25 ▲0.0236.65 ▲0.59
Mailster /wp-admin/admin.php?page=w2dc_mail3.1932.24

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
recovery_mode_email_last_sent
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

W2DC Mail: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.26 ▼1.323.93 ▲2.1340.51 ▼2.86
Dashboard /wp-admin2,209 ▲184.85 ▼0.0096.47 ▼18.2040.25 ▼6.53
Posts /wp-admin/edit.php2,089 ▲32.01 ▼0.0640.38 ▲4.4935.87 ▼0.53
Add New Post /wp-admin/post-new.php1,537 ▲423.08 ▼0.14649.46 ▼50.7356.32 ▼12.85
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.0995.44 ▼9.1243.31 ▼0.66
Mailster /wp-admin/admin.php?page=w2dc_mail6731.146.5021.61

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 were found after uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • recovery_mode_email_last_sent
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=w2dc_mail
    • > Error in wp-content/plugins/w2dc-mail/classes/mailsterW2DC.class.php+112
    Uncaught Error: Call to undefined function w2dc_renderTemplate() in wp-content/plugins/w2dc-mail/classes/mailsterW2DC.class.php:112
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): MailsterW2DC::w2dc_mail_function()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/admin.php(259): do_action()
    #4 {main}
    thrown

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/w2dc-mail/includes/controller.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_pages() in wp-content/plugins/w2dc-mail/w2dc_mail.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/w2dc-mail/views/w2dc_mailster.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% 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
No plugin tags provided

w2dc-mail/w2dc_mail.php 92% from 13 tests

The main file in "W2DC Mail" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("w2dc-mail.php" instead of "w2dc_mail.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin116 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP46161116

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.77MB with 0.56MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png186.09KB59.32KB▼ 68.12%
assets/icon-128x128.png21.26KB4.21KB▼ 80.19%
assets/screenshot-1.png76.33KB22.46KB▼ 70.57%
assets/screenshot-2.png160.96KB50.54KB▼ 68.60%
assets/icon-256x256.png38.89KB9.45KB▼ 75.70%