78% emailchef-for-woocommerce

Code Review | Emailchef for WooCommerce

WordPress plugin Emailchef for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: emailchef-for-woo...
  • Plugin version: 4.9
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jul 26, 2017
  • Latest release: Nov 28, 2023
  • Number of updates: 48
  • Update frequency: every 48.3 days
  • Top authors: dueclic (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /3,189 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.45MB] [CPU: ▲318.26ms] 75% from 4 tests

Server-side resources used by Emailchef for WooCommerce
It is recommended to improve the following
  • Extra CPU: Try to keep extra CPU usage under 200.00ms (currently 318.26ms on /wp-admin/admin.php?page=emailchef-debug)
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.47348.47 ▲306.50
Dashboard /wp-admin3.76 ▲0.41406.21 ▲347.62
Posts /wp-admin/edit.php3.81 ▲0.45357.75 ▲313.74
Add New Post /wp-admin/post-new.php6.37 ▲0.48421.91 ▲328.81
Media Library /wp-admin/upload.php3.68 ▲0.45358.95 ▲323.97
Emailchef DEBUG /wp-admin/admin.php?page=emailchef-debug3.66266.24

Server storage [IO: ▲0.69MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 23 new files
Database: 1 new table, 13 new options
New tables
wp_emailchef_abcart
New WordPress options
wc_emailchef_api_user
can_compress_scripts
widget_theysaidso_widget
wc_emailchef_api_pass
wc_emailchef_enabled
db_upgraded
widget_recent-posts
wc_emailchef_policy_type
widget_recent-comments
wc_emailchef_list
...

Browser metrics Passed 4 tests

Emailchef for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲7214.06 ▼0.172.25 ▲0.5241.47 ▼2.30
Dashboard /wp-admin2,205 ▲285.70 ▲0.1583.80 ▼17.3238.63 ▼4.73
Posts /wp-admin/edit.php2,110 ▲101.94 ▼0.0638.68 ▲2.4635.16 ▼4.42
Add New Post /wp-admin/post-new.php1,535 ▲920.70 ▼2.83643.98 ▲23.4653.44 ▼5.36
Media Library /wp-admin/upload.php1,413 ▲134.17 ▼0.01107.48 ▲11.8844.79 ▲4.70
Emailchef DEBUG /wp-admin/admin.php?page=emailchef-debug8111.6925.3825.44

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 items
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/emailchef-for-woocommerce/cli/import.php
    • > /wp-content/plugins/emailchef-for-woocommerce/emails/opt_in.php
    • > /wp-content/plugins/emailchef-for-woocommerce/emails/opt_in_it.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/emailchef-for-woocommerce/conf/custom_fields.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WCEC() in wp-content/plugins/emailchef-for-woocommerce/pages/admin-debug.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
10 plugin tags: email, email campaigns, e-commerce, mail, emailchef...

emailchef-for-woocommerce/woocommerce-emailchef.php 85% from 13 tests

"Emailchef for WooCommerce" version 4.9's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("emailchef-for-woocommerce.php" instead of "woocommerce-emailchef.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 141 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected17,297 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
JSON20013,800
PHP139193232,961
PO File1128133356
Markdown1860131
JavaScript212548
CSS1011

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity36.50
▷ Minimum class complexity6.00
▷ Maximum class complexity91.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes233.33%
Methods130
▷ Static methods86.15%
▷ Public methods10983.85%
▷ Protected methods21.54%
▷ Private methods1914.62%
Functions18
▷ Named functions1266.67%
▷ Anonymous functions633.33%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
dist/img/placeholder.png3.94KB2.34KB▼ 40.66%
dist/img/emailchef.png8.15KB4.02KB▼ 50.61%