94% add-sku-to-email-notifications-in-wp-e-commerce

Code Review | WP e-Commerce SKU in notification emails

WordPress plugin WP e-Commerce SKU in notification emails scored 94% from 54 tests.

About plugin

  • Plugin page: add-sku-to-email-...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.5
  • WordPress version: 5.9.2
  • First release: May 12, 2013
  • Latest release: May 12, 2013
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: leewillis77 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,170 total downloads

Benchmarks

Plugin footprint Passed 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.01MB] [CPU: ▼306.93ms] Passed 4 tests

This is a short check of server-side resources used by WP e-Commerce SKU in notification emails
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0151.42 ▼1.32
Dashboard /wp-admin3.41 ▲0.0132.19 ▼2.22
Posts /wp-admin/edit.php3.65 ▲0.0135.19 ▼2.11
Add New Post /wp-admin/post-new.php6.89 ▼0.0898.00 ▼1,222.07
Media Library /wp-admin/upload.php3.30 ▲0.0129.68 ▲5.15

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by WP e-Commerce SKU in notification emails
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,771 ▲1715.66 ▲0.006.16 ▼0.581.89 ▼1.24
Dashboard /wp-admin2,881 ▲206.11 ▼0.07114.66 ▼17.67155.64 ▼2.57
Posts /wp-admin/edit.php2,694 ▲63.23 ▲0.0162.61 ▼5.58138.47 ▼5.98
Add New Post /wp-admin/post-new.php1,752 ▲8421.32 ▲3.32447.45 ▲44.78152.73 ▼0.16
Media Library /wp-admin/upload.php1,698 ▼35.53 ▲0.09143.69 ▼2.82188.07 ▲6.69

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/add-sku-to-email-notifications-in-wp-e-commerce/wpec-sku-notification-emails.php:49

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === add-sku-to-email-notifications-in-wp-e-commerce === )
You can take inspiration from this readme.txt

add-sku-to-email-notifications-in-wp-e-commerce/wpec-sku-notification-emails.php 92% from 13 tests

This is the main PHP file of "WP e-Commerce SKU in notification emails" version 0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("add-sku-to-email-notifications-in-wp-e-commerce.php" instead of "wpec-sku-notification-emails.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin27 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
Markdown16015
PHP182912

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
No PNG images were found in this plugin