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 gracefully, with no errors
Server metrics [RAM: ▲0.17MB] [CPU: ▼4.79ms] Passed 4 tests
Server-side resources used by Elasticommerce Related Items
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.62 ▲0.15 | 38.29 ▼4.36 |
Dashboard /wp-admin | 3.53 ▲0.22 | 51.32 ▲0.33 |
Posts /wp-admin/edit.php | 3.58 ▲0.22 | 50.25 ▲2.11 |
Add New Post /wp-admin/post-new.php | 6.05 ▲0.16 | 88.22 ▼17.23 |
Media Library /wp-admin/upload.php | 3.39 ▲0.16 | 37.31 ▲2.95 |
Elasticommerce Services /wp-admin/options-general.php?page=escr_related | 3.36 | 34.33 |
Server storage [IO: ▲0.06MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 31 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-posts |
widget_theysaidso_widget |
can_compress_scripts |
db_upgraded |
widget_esc_relateditems |
theysaidso_admin_options |
widget_recent-comments |
Browser metrics Passed 4 tests
An overview of browser requirements for Elasticommerce Related Items
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,793 ▲32 | 14.73 ▲0.15 | 1.92 ▲0.08 | 43.09 ▲2.21 |
Dashboard /wp-admin | 2,202 ▲25 | 5.70 ▲0.11 | 84.83 ▼6.32 | 42.52 ▲0.31 |
Posts /wp-admin/edit.php | 2,101 ▼2 | 2.05 ▲0.08 | 35.49 ▼4.44 | 38.08 ▼1.29 |
Add New Post /wp-admin/post-new.php | 1,529 ▼3 | 17.57 ▼5.61 | 653.68 ▲11.73 | 62.38 ▲4.53 |
Media Library /wp-admin/upload.php | 1,404 ▲7 | 4.19 ▼0.23 | 97.86 ▼6.40 | 42.47 ▼1.55 |
Elasticommerce Services /wp-admin/options-general.php?page=escr_related | 862 | 2.02 | 22.91 | 28.70 |
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 did not uninstall successfully, leaving 7 options in the database
- widget_esc_relateditems
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-comments
- theysaidso_admin_options
- db_upgraded
- widget_recent-posts
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test
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
- 4× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Log\\LoggerInterface' not found in wp-content/plugins/elasticommerce-related-items/vendor/psr/log/Psr/Log/AbstractLogger.php:12
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/elasticommerce-related-items/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/elasticommerce-related-items/elasticommerce-relateditem.php:159
- > PHP Fatal error
Uncaught Error: Class 'Psr\\Log\\AbstractLogger' not found in wp-content/plugins/elasticommerce-related-items/vendor/psr/log/Psr/Log/NullLogger.php:13
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt Passed 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: woocommerce, elasticsearch, recommend
elasticommerce-related-items/elasticommerce-relateditem.php 77% from 13 tests
"Elasticommerce Related Items" version 0.2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
- Domain Path: The domain path points to a folder that does not exist ("/languages")
- Main file name: Name the main plugin file the same as the plugin slug ("elasticommerce-related-items.php" instead of "elasticommerce-relateditem.php")
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
Success! There were no dangerous files found in this plugin1,354 lines of code in 26 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 23 | 214 | 937 | 1,205 |
JSON | 2 | 0 | 0 | 116 |
Markdown | 1 | 12 | 0 | 33 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.29 |
Average class complexity | 7.11 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 39.00 |
Average method complexity | 2.21 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 3 | |
Interfaces | 2 | |
Traits | 2 | |
Classes | 15 | |
▷ Abstract classes | 2 | 13.33% |
▷ Concrete classes | 13 | 86.67% |
▷ Final classes | 0 | 0.00% |
Methods | 109 | |
▷ Static methods | 8 | 7.34% |
▷ Public methods | 93 | 85.32% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 16 | 14.68% |
Functions | 6 | |
▷ Named functions | 6 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 10 | |
▷ Global constants | 1 | 10.00% |
▷ Class constants | 9 | 90.00% |
▷ Public constants | 9 | 100.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
There were not PNG files found in your plugin