78% emailplatform-woocommerce

Code Review | eMailPlatform for WooCommerce

WordPress plugin eMailPlatform for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: emailplatform-woo...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-5.1
  • WordPress version: 6.3.1
  • First release: Feb 4, 2019
  • Latest release: Mar 28, 2019
  • Number of updates: 12
  • Update frequency: every 4.4 days
  • Top authors: emailplatform (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /575 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.30ms] Passed 4 tests

Analyzing server-side resources used by eMailPlatform for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.06 ▲1.29
Dashboard /wp-admin3.35 ▲0.0146.91 ▼11.25
Posts /wp-admin/edit.php3.46 ▲0.1146.83 ▼0.10
Add New Post /wp-admin/post-new.php5.95 ▲0.0781.61 ▼11.14
Media Library /wp-admin/upload.php3.27 ▲0.0535.81 ▲3.59

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, 19 new options
New WordPress options
wc_emailplatform_api_token
widget_recent-posts
wc_emailplatform_list
wc_emailplatform_api_username
wc_emailplatform_debug
wc_emailplatform_enabled
widget_recent-comments
wc_emailplatform_firstname
wc_emailplatform_opt_in_checkbox_default_status
wc_emailplatform_double_opt_in
...

Browser metrics Passed 4 tests

A check of browser resources used by eMailPlatform for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6114.72 ▲0.341.81 ▲0.0939.91 ▼4.39
Dashboard /wp-admin2,210 ▲335.55 ▼0.1280.61 ▼11.6841.00 ▼1.55
Posts /wp-admin/edit.php2,118 ▲181.98 ▼0.0537.99 ▲4.4432.33 ▼4.06
Add New Post /wp-admin/post-new.php1,544 ▲1722.86 ▼0.19677.33 ▼8.3856.96 ▲0.55
Media Library /wp-admin/upload.php1,421 ▲214.20 ▼0.0899.01 ▲0.7546.41 ▲3.65

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
  • This plugin does not fully uninstall, leaving 19 options in the database
    • wc_emailplatform_opt_in_label
    • wc_emailplatform_display_opt_in
    • wc_emailplatform_enabled
    • theysaidso_admin_options
    • wc_emailplatform_api_username
    • wc_emailplatform_api_token
    • wc_emailplatform_opt_in_checkbox_display_location
    • wc_emailplatform_opt_in_checkbox_default_status
    • can_compress_scripts
    • wc_emailplatform_list
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/emailplatform-woocommerce/emailplatform-woocommerce.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/emailplatform-woocommerce/config/default-settings.php:13

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

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Requires php: The plugin version is formatted incorrectly
The official readme.txt might help

emailplatform-woocommerce/emailplatform-woocommerce.php Passed 13 tests

"eMailPlatform for WooCommerce" version 1.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
59 characters long description:
Add subscribe to eMailPlatform on WooCommerce checkout page

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
Success! There were no dangerous files found in this plugin1,806 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP146931,0321,574
JavaScript15634186
CSS17041
XML1005

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity23.90
▷ Minimum class complexity8.00
▷ Maximum class complexity48.00
Average method complexity2.68
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes110.00%
▷ Concrete classes990.00%
▷ Final classes555.56%
Methods136
▷ Static methods2417.65%
▷ Public methods11483.82%
▷ Protected methods10.74%
▷ Private methods2115.44%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants1083.33%
▷ Class constants216.67%
▷ Public constants2100.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.25MB with 0.17MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png67.04KB22.47KB▼ 66.48%
assets/screenshot-1.png188.52KB56.93KB▼ 69.80%