68% et-mailing

Code Review | ET Mailing

WordPress plugin ET Mailing scored68%from 54 tests.

About plugin

  • Plugin page: et-mailing
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.1
  • WordPress version: 6.3.1
  • First release: Mar 5, 2015
  • Latest release: Mar 14, 2015
  • Number of updates: 15
  • Update frequency: every 0.7 days
  • Top authors: Enginethemes (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active /2,987 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼7.76ms] Passed 4 tests

Analyzing server-side resources used by ET Mailing
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0233.32 ▼2.28
Dashboard /wp-admin3.50 ▲0.2045.29 ▼2.69
Posts /wp-admin/edit.php3.55 ▲0.2048.65 ▲1.53
Add New Post /wp-admin/post-new.php6.04 ▲0.1581.80 ▼27.60
Media Library /wp-admin/upload.php3.36 ▲0.1335.97 ▲1.66
General settings /wp-admin/admin.php?page=aem-settings3.3731.85
Mandrill /wp-admin/admin.php?page=mandrill-settings3.3733.71
Mailgun /wp-admin/admin.php?page=mailgun-settings3.3733.04
SendGrid /wp-admin/admin.php?page=sendgrid-settings3.3734.58

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 885 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for ET Mailing
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,881 ▲11013.99 ▼0.591.77 ▼0.2641.65 ▼3.66
Dashboard /wp-admin2,287 ▲1025.62 ▲0.60118.48 ▲13.1139.60 ▼5.68
Posts /wp-admin/edit.php2,172 ▲832.58 ▲0.5548.19 ▲11.7236.26 ▼1.84
Add New Post /wp-admin/post-new.php1,584 ▲7023.60 ▲6.08648.67 ▼41.5736.50 ▼15.31
Media Library /wp-admin/upload.php1,468 ▲804.37 ▲0.0690.49 ▼16.2942.95 ▼3.18
General settings /wp-admin/admin.php?page=aem-settings1,5246.38132.7495.76
Mandrill /wp-admin/admin.php?page=mandrill-settings1,4196.28112.7870.16
Mailgun /wp-admin/admin.php?page=mailgun-settings1,3826.27102.8266.48
SendGrid /wp-admin/admin.php?page=sendgrid-settings1,3506.34100.2071.22

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/et-mailing/inc/module/sendgrid/lib/vendor/sendgrid/smtpapi/scripts/generate_upload_policy.php
    • > /wp-content/plugins/et-mailing/inc/module/sendgrid/lib/vendor/sendgrid/sendgrid/scripts/generate_upload_policy.php
  • 419× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      require_once(AEM_PLUGIN_PATH/inc/module/mandrill/lib/vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/et-mailing/inc/module/mandrill/class-aem-module-mandrill-client.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'Guzzle\\Tests\\GuzzleTestCase' not found in wp-content/plugins/et-mailing/inc/module/mailgun/lib/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/OperationCommandTest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Guzzle\\Tests\\Service\\Command\\LocationVisitor\\Response\\AbstractResponseVisitorTest' not found in wp-content/plugins/et-mailing/inc/module/mailgun/lib/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Response/XmlVisitorTest.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Guzzle\\Cache\\CacheAdapterInterface' not found in wp-content/plugins/et-mailing/inc/module/mailgun/lib/vendor/guzzle/guzzle/src/Guzzle/Cache/AbstractCacheAdapter.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Guzzle\\Common\\Exception\\GuzzleException' not found in wp-content/plugins/et-mailing/inc/module/mailgun/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/HttpException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Guzzle\\Http\\Message\\AbstractMessage' not found in wp-content/plugins/et-mailing/inc/module/mailgun/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Guzzle\\Cache\\AbstractCacheAdapter' not found in wp-content/plugins/et-mailing/inc/module/mailgun/lib/vendor/guzzle/guzzle/src/Guzzle/Cache/NullCacheAdapter.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Guzzle\\Tests\\GuzzleTestCase' not found in wp-content/plugins/et-mailing/inc/module/mailgun/lib/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/Message/MessageParserProvider.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Guzzle\\Common\\AbstractHasDispatcher' not found in wp-content/plugins/et-mailing/inc/module/mailgun/lib/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIterator.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\EventDispatcher\\EventSubscriberInterface' not found in wp-content/plugins/et-mailing/inc/module/mailgun/lib/vendor/guzzle/guzzle/src/Guzzle/Plugin/Md5/CommandContentMd5Plugin.php:13

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

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (General settings), #2 (Send test email.), #3 (API Settings)
The official readme.txt is a good inspiration

et-mailing/et_mailing.php 92% from 13 tests

The main file in "ET Mailing" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("et-mailing.php" instead of "et_mailing.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Almost there! Just fix the following issues
  • Do not include executable or dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/et-mailing/inc/module/mandrill/lib/vendor/mandrill/mandrill/src/ca-bundle.crt
79,310 lines of code in 784 files:
LanguageFilesBlank linesComment linesLines of code
PHP5377,79614,05439,888
HTML1026,154025,495
CSS135881433,585
JavaScript143104112,722
Markdown1561702,331
reStructuredText301,2361,7941,824
JSON471501,578
SVG300971
XML133111550
make1245124
YAML47087
Bourne Shell212458
Python1222349
Ant110134
PO File10014

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity5.67
▷ Minimum class complexity1.00
▷ Maximum class complexity86.00
Average method complexity1.74
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces111
Interfaces53
Traits0
Classes506
▷ Abstract classes203.95%
▷ Concrete classes48696.05%
▷ Final classes10.21%
Methods3,607
▷ Static methods1263.49%
▷ Public methods3,35392.96%
▷ Protected methods2115.85%
▷ Private methods431.19%
Functions157
▷ Named functions3119.75%
▷ Anonymous functions12680.25%
Constants116
▷ Global constants65.17%
▷ Class constants11094.83%
▷ Public constants110100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
44 PNG files occupy 0.72MB with 0.42MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png81.08KB29.70KB▼ 63.37%
inc/module/mailgun/lib/vendor/mailgun/mailgun-php/tests/Mailgun/Tests/TestAssets/mailgun_icon1.png84.81KB39.12KB▼ 53.87%
inc/module/mandrill/lib/vendor/mandrill/mandrill/docs/resources/resize.png0.21KB0.10KB▼ 51.39%
screenshot-3.png127.69KB42.35KB▼ 66.84%
inc/module/mailgun/lib/vendor/mailgun/mailgun-php/tests/Mailgun/Tests/TestAssets/mailgun_icon2.png84.81KB39.12KB▼ 53.87%