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 gracefully, with no errors
Server metrics [RAM: ▲0.05MB] [CPU: ▼7.32ms] Passed 4 tests
A check of server-side resources used by Preview E-mails for WooCommerce
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.53 ▲0.06 | 45.02 ▲0.18 |
Dashboard /wp-admin | 3.37 ▲0.02 | 51.26 ▼20.78 |
Posts /wp-admin/edit.php | 3.48 ▲0.13 | 56.80 ▲5.81 |
Add New Post /wp-admin/post-new.php | 5.95 ▲0.06 | 97.83 ▼4.50 |
Media Library /wp-admin/upload.php | 3.29 ▲0.06 | 43.06 ▼4.18 |
Server storage [IO: ▲0.14MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
widget_recent-comments |
theysaidso_admin_options |
db_upgraded |
widget_theysaidso_widget |
can_compress_scripts |
Browser metrics Passed 4 tests
Preview E-mails for WooCommerce: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.25 ▼0.12 | 1.82 ▼0.14 | 48.23 ▲5.21 |
Dashboard /wp-admin | 2,195 ▲18 | 5.65 ▲0.05 | 98.11 ▼2.40 | 42.04 ▼3.43 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 1.98 ▼0.05 | 38.28 ▼0.64 | 36.06 ▲1.67 |
Add New Post /wp-admin/post-new.php | 1,526 ▼3 | 23.18 ▼0.04 | 668.15 ▼28.56 | 56.44 ▲1.05 |
Media Library /wp-admin/upload.php | 1,403 ▲6 | 4.19 ▼0.04 | 95.47 ▼29.31 | 43.86 ▼7.01 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
- Zombie WordPress options detected upon uninstall: 6 options
- widget_recent-posts
- can_compress_scripts
- widget_theysaidso_widget
- db_upgraded
- widget_recent-comments
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested
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
The following issues need your attention
- 7× PHP files trigger server errors when accessed directly:
- > PHP Warning
require_once(WOO_PREVIEW_EMAILS_DIR/vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/woo-preview-emails/includes/Bootstrap.php on line 43
- > PHP Warning
Use of undefined constant WOO_PREVIEW_EMAILS_DIR - assumed 'WOO_PREVIEW_EMAILS_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-preview-emails/includes/Bootstrap.php on line 43
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/woo-preview-emails/views/result/style.php:4
- > PHP Fatal error
require_once(): Failed opening required 'WOO_PREVIEW_EMAILS_DIR/vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-preview-emails/includes/Bootstrap.php on line 43
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/woo-preview-emails/views/form.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function site_url() in wp-content/plugins/woo-preview-emails/views/result/scripts.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function Codemanas\\WooPreviewEmails\\plugins_url() in wp-content/plugins/woo-preview-emails/includes/Main.php:20
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: preview, woocommerce, emails
woo-preview-emails/woocommerce-preview-emails.php 85% from 13 tests
This is the main PHP file of "Preview E-mails for WooCommerce" version 2.1.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("woo-preview-emails.php" instead of "woocommerce-preview-emails.php")
- Requires at least: The required version number must match the one declared in readme.txt ("6.0" instead of "3.0.0")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin999 lines of code in 16 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 13 | 140 | 305 | 876 |
CSS | 2 | 24 | 0 | 122 |
JavaScript | 1 | 0 | 1 | 1 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.41 |
Average class complexity | 21.60 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 48.00 |
Average method complexity | 3.22 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 21.00 |
Code structure | ||
---|---|---|
Namespaces | 2 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 5 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 5 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 47 | |
▷ Static methods | 9 | 19.15% |
▷ Public methods | 44 | 93.62% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 3 | 6.38% |
Functions | 2 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 2 | 100.00% |
Constants | 3 | |
▷ Global constants | 3 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin