84% ecomail

Code Review | Ecomail

WordPress plugin Ecomail scored84%from 54 tests.

About plugin

  • Plugin page: ecomail
  • Plugin version: 2.1.6
  • PHP compatiblity: 7.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 3, 2021
  • Latest release: Sep 25, 2023
  • Number of updates: 16
  • Update frequency: every 53.1 days
  • Top authors: ecomailcz (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

800+ active /5,395 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.85ms] Passed 4 tests

Server-side resources used by Ecomail
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.48 ▼2.10
Dashboard /wp-admin3.32 ▲0.0249.79 ▼4.15
Posts /wp-admin/edit.php3.38 ▲0.0248.25 ▼6.63
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.97 ▼10.52
Media Library /wp-admin/upload.php3.25 ▲0.0236.43 ▼1.33

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

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

Browser metrics Passed 4 tests

Ecomail: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲3414.34 ▼0.011.93 ▼0.2643.87 ▼1.66
Dashboard /wp-admin2,201 ▲275.62 ▼0.0094.36 ▼3.6342.68 ▼6.71
Posts /wp-admin/edit.php2,107 ▲101.99 ▼0.0336.23 ▼3.8234.48 ▼6.02
Add New Post /wp-admin/post-new.php1,532 ▲623.13 ▼0.51652.82 ▲5.2755.67 ▼3.11
Media Library /wp-admin/upload.php1,409 ▲154.22 ▲0.0293.80 ▼13.0043.06 ▼4.19

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 167× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'EcomailDeps\\Wpify\\CustomFields\\Implementations\\AbstractPostImplementation' not found in wp-content/plugins/ecomail/deps/wpify/custom-fields/src/Implementations/Metabox.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'EcomailDeps\\Wpify\\Model\\Abstracts\\AbstractRepository' not found in wp-content/plugins/ecomail/deps/wpify/model/src/Abstracts/AbstractDbTableRepository.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'EcomailDeps\\Wpify\\Model\\Abstracts\\AbstractTermRepository' not found in wp-content/plugins/ecomail/deps/wpify/model/src/MenuRepository.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'EcomailDeps\\Invoker\\InvokerInterface' not found in wp-content/plugins/ecomail/deps/php-di/invoker/src/Invoker.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'EcomailDeps\\PHPStan\\PhpDocParser\\Ast\\Type\\TypeNode' not found in wp-content/plugins/ecomail/deps/phpstan/phpdoc-parser/src/Ast/Type/ArrayShapeItemNode.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'EcomailDeps\\Wpify\\Model\\Abstracts\\AbstractPostRepository' not found in wp-content/plugins/ecomail/deps/wpify/model/src/PageRepository.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'EcomailDeps\\PHPStan\\PhpDocParser\\Ast\\PhpDoc\\PhpDocTagValueNode' not found in wp-content/plugins/ecomail/deps/phpstan/phpdoc-parser/src/Ast/PhpDoc/InvalidTagValueNode.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'EcomailDeps\\DI\\Definition\\Helper\\CreateDefinitionHelper' not found in wp-content/plugins/ecomail/deps/php-di/php-di/src/Definition/Helper/AutowireDefinitionHelper.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'EcomailDeps\\DI\\Definition\\Definition' not found in wp-content/plugins/ecomail/deps/php-di/php-di/src/Definition/InstanceDefinition.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'EcomailDeps\\DI\\Definition\\Definition' not found in wp-content/plugins/ecomail/deps/php-di/php-di/src/Definition/ArrayDefinition.php:12

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 Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: email, woocommerce, newsletter, emailing, marketing...

ecomail/ecomail.php 85% from 13 tests

This is the main PHP file of "Ecomail" version 2.1.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Requires PHP: Required version must match the one declared in readme.txt ("7.4" instead of "7.4.0")
  • Requires at least: Required version must match the one declared in readme.txt ("5.3" instead of "5.3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected16,769 lines of code in 302 files:
LanguageFilesBlank linesComment linesLines of code
PHP2658725,70814,145
Markdown1659601,388
JSON1300955
PO File16576203
JavaScript46060
YAML11012
SVG1004
CSS1002

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.40
Average class complexity8.71
▷ Minimum class complexity1.00
▷ Maximum class complexity318.00
Average method complexity2.49
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces52
Interfaces32
Traits1
Classes214
▷ Abstract classes146.54%
▷ Concrete classes20093.46%
▷ Final classes178.50%
Methods1,216
▷ Static methods725.92%
▷ Public methods1,05987.09%
▷ Protected methods504.11%
▷ Private methods1078.80%
Functions77
▷ Named functions2025.97%
▷ Anonymous functions5774.03%
Constants61
▷ Global constants58.20%
▷ Class constants5691.80%
▷ Public constants5394.64%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.23MB with 0.15MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
deps/wpify/custom-fields/build/images/flags.007b2705.png69.20KB23.42KB▼ 66.16%
deps/wpify/custom-fields/build/images/flags@2x.9d5328fb.png170.28KB68.04KB▼ 60.04%