72% emailchef

Code Review | Emailchef

WordPress plugin Emailchef scored72%from 54 tests.

About plugin

  • Plugin page: emailchef
  • Plugin version: 2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: May 8, 2016
  • Latest release: Dec 1, 2023
  • Number of updates: 41
  • Update frequency: every 67.5 days
  • Top authors: dueclic (73.17%)hanicker (29.27%)

Code review

54 tests

User reviews

4 reviews

Install metrics

60+ active /3,898 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.21MB] [CPU: ▲0.91ms] Passed 4 tests

This is a short check of server-side resources used by Emailchef
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2340.00 ▲0.20
Dashboard /wp-admin3.55 ▲0.2546.18 ▼1.71
Posts /wp-admin/edit.php3.61 ▲0.2563.51 ▲17.30
Add New Post /wp-admin/post-new.php6.07 ▲0.1994.94 ▲4.06
Media Library /wp-admin/upload.php3.42 ▲0.1934.11 ▲1.11
Forms /wp-admin/admin.php?page=emailchef3.3932.63
Settings /wp-admin/admin.php?page=emailchef-options3.3833.20

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 98 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Emailchef
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5014.10 ▼0.611.72 ▼0.1442.15 ▼0.93
Dashboard /wp-admin2,217 ▲435.68 ▲0.0693.74 ▼2.4282.86 ▲37.68
Posts /wp-admin/edit.php2,128 ▲281.98 ▼0.0540.46 ▲2.4935.37 ▼2.61
Add New Post /wp-admin/post-new.php1,559 ▲3023.47 ▲0.07704.78 ▲79.8971.40 ▲19.89
Media Library /wp-admin/upload.php1,422 ▲194.09 ▼0.1096.04 ▼3.3470.95 ▲30.16
Forms /wp-admin/admin.php?page=emailchef8141.6525.4626.75
Settings /wp-admin/admin.php?page=emailchef-options8521.6725.4026.79

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=emailchef-options
    • > Notice in wp-content/plugins/emailchef/admin/class-emailchef-admin.php+176
    Trying to access array offset on value of type bool

SRP 0% 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
The following issues need your attention
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/emailchef/lib/emailchef/vendor/nategood/httpful/tests/bootstrap-server.php
    • > /wp-content/plugins/emailchef/lib/emailchef/vendor/nategood/httpful/examples/github.php
    • > /wp-content/plugins/emailchef/lib/emailchef/vendor/nategood/httpful/examples/showclix.php
  • 37× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/emailchef/lib/emailchef/test/unit/Command/CreateSegmentCommandTest.php:5
    • > PHP Warning
      Use of undefined constant WEB_SERVER_DOCROOT - assumed 'WEB_SERVER_DOCROOT' (this will throw an Error in a future version of PHP) in wp-content/plugins/emailchef/lib/emailchef/vendor/nategood/httpful/tests/bootstrap-server.php on line 15
    • > PHP Fatal error
      Uncaught Exception: Unable to parse response as JSON in wp-content/plugins/emailchef/lib/emailchef/vendor/nategood/httpful/src/Httpful/Handlers/JsonHandler.php:30
    • > PHP Notice
      Trying to get property 'event_start' of non-object in wp-content/plugins/emailchef/lib/emailchef/vendor/nategood/httpful/examples/showclix.php on line 14
    • > PHP Notice
      Trying to get property 'name' of non-object in wp-content/plugins/emailchef/lib/emailchef/vendor/nategood/httpful/examples/github.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/emailchef/includes/drivers/class-emailchef-drivers-forms.php:2
    • > PHP Warning
      Use of undefined constant WEB_SERVER_HOST - assumed 'WEB_SERVER_HOST' (this will throw an Error in a future version of PHP) in wp-content/plugins/emailchef/lib/emailchef/vendor/nategood/httpful/tests/Httpful/HttpfulTest.php on line 22
    • > PHP Notice
      Trying to get property 'created-at' of non-object in wp-content/plugins/emailchef/lib/emailchef/vendor/nategood/httpful/examples/github.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/emailchef/lib/emailchef/test/unit/Command/AddEmailsToGroupCommandTest.php:5
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/emailchef/admin/partials/emailchef-page-forms-form.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: newsletter, emailchef, forms, email, automation...

emailchef/emailchef.php 92% from 13 tests

The main file in "Emailchef" v. 2.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 141 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected4,341 lines of code in 86 files:
LanguageFilesBlank linesComment linesLines of code
PHP737691,5133,577
Markdown31370280
JavaScript12845136
CSS1154108
JSON400105
PO File1313798
XML21023
YAML13014

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity6.76
▷ Minimum class complexity1.00
▷ Maximum class complexity76.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes58
▷ Abstract classes11.72%
▷ Concrete classes5798.28%
▷ Final classes11.75%
Methods299
▷ Static methods4214.05%
▷ Public methods28294.31%
▷ Protected methods10.33%
▷ Private methods165.35%
Functions11
▷ Named functions654.55%
▷ Anonymous functions545.45%
Constants50
▷ Global constants48.00%
▷ Class constants4692.00%
▷ Public constants46100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/icon.png0.34KB0.32KB▼ 8.50%
admin/img/logo.png8.15KB4.02KB▼ 50.61%