78% wp-e-commerce-style-email

Code Review | WP e-Commerce Style Email

WordPress plugin WP e-Commerce Style Email scored78%from 54 tests.

About plugin

  • Plugin page: wp-e-commerce-sty...
  • Plugin version: 0.6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.4.2
  • WordPress version: 6.3.1
  • First release: Sep 13, 2011
  • Latest release: Dec 20, 2012
  • Number of updates: 22
  • Update frequency: every 21.2 days
  • Top authors: mightyturtle (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

70+ active /16,264 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.19MB] [CPU: ▼16.71ms] Passed 4 tests

A check of server-side resources used by WP e-Commerce Style Email
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.86 ▼7.79
Dashboard /wp-admin3.10 ▼0.2128.44 ▼19.04
Posts /wp-admin/edit.php3.24 ▼0.1234.18 ▼16.03
Add New Post /wp-admin/post-new.php5.48 ▼0.4175.75 ▼23.98
Media Library /wp-admin/upload.php3.18 ▼0.0431.34 ▼0.69
Store Email Style /wp-admin/options-general.php?page=store-email-style-options3.3029.96

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP e-Commerce Style Email
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.29 ▼1.464.57 ▲2.5445.56 ▼0.50
Dashboard /wp-admin2,213 ▲315.83 ▼0.01100.56 ▼0.0238.91 ▼2.45
Posts /wp-admin/edit.php2,093 ▲12.02 ▼0.0239.26 ▼3.4134.99 ▼2.71
Add New Post /wp-admin/post-new.php1,545 ▲1418.62 ▲0.19628.91 ▼18.7954.93 ▲4.81
Media Library /wp-admin/upload.php1,395 ▲104.21 ▲0.0397.53 ▼5.6042.30 ▼3.25
Store Email Style /wp-admin/options-general.php?page=store-email-style-options9911.9228.7229.55

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=store-email-style-options
    • > User deprecated in wp-includes/functions.php+5453
    Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead.

SRP 50% 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 items
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ecse_get_email_subject() in wp-content/plugins/wp-e-commerce-style-email/theme/wpsc-email_style.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/wp-e-commerce-style-email/admin_functions.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wpsc_currency_display() in wp-content/plugins/wp-e-commerce-style-email/theme/wpsc-email_content_part-totals.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'ECSE_purchase' not found in wp-content/plugins/wp-e-commerce-style-email/theme/wpsc-email_content_part-addresses.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'ECSE_purchase_product' not found in wp-content/plugins/wp-e-commerce-style-email/theme/wpsc-email_content_part-product_row.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-e-commerce-style-email/options_page.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-e-commerce-style-email/wp-e-commerce-style-email.php:40
    • > PHP Fatal error
      Uncaught Error: Class 'ECSE_purchase' not found in wp-content/plugins/wp-e-commerce-style-email/theme/wpsc-email_content-receipt.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (The admin/settings page steps you through the process.) image not found
Please take inspiration from this readme.txt

wp-e-commerce-style-email/wp-e-commerce-style-email.php 92% from 13 tests

The main PHP file in "WP e-Commerce Style Email" ver. 0.6.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 256 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin1,415 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP103745171,283
CSS1260132

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity36.33
▷ Minimum class complexity7.00
▷ Maximum class complexity66.00
Average method complexity3.59
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods41
▷ Static methods41100.00%
▷ Public methods3995.12%
▷ Protected methods00.00%
▷ Private methods24.88%
Functions33
▷ Named functions33100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png59.63KB26.14KB▼ 56.16%
images/macFFBgHack.png0.20KB0.09KB▼ 53.14%