Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully
Server metrics [RAM: ▲0.06MB] [CPU: ▼10.93ms] Passed 4 tests
A check of server-side resources used by Product Advertiser for WooCommerce
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.54 ▲0.07 | 40.69 ▼0.62 |
Dashboard /wp-admin | 3.38 ▲0.03 | 49.34 ▼17.58 |
Posts /wp-admin/edit.php | 3.49 ▲0.13 | 51.03 ▼0.81 |
Add New Post /wp-admin/post-new.php | 5.96 ▲0.07 | 87.92 ▼24.69 |
Media Library /wp-admin/upload.php | 3.30 ▲0.06 | 40.26 ▲4.22 |
Server storage [IO: ▲0.04MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
db_upgraded |
can_compress_scripts |
widget_recent-comments |
widget_theysaidso_widget |
theysaidso_admin_options |
Browser metrics Passed 4 tests
Checking browser requirements for Product Advertiser for WooCommerce
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,901 ▲155 | 13.81 ▼0.19 | 8.65 ▲6.84 | 40.16 ▼1.99 |
Dashboard /wp-admin | 2,211 ▲37 | 5.62 ▼0.02 | 93.70 ▲2.59 | 42.51 ▲0.02 |
Posts /wp-admin/edit.php | 2,116 ▲16 | 2.02 ▲0.01 | 40.00 ▲1.66 | 38.77 ▲4.56 |
Add New Post /wp-admin/post-new.php | 1,539 ▲8 | 17.65 ▼5.68 | 676.95 ▲30.05 | 60.77 ▲2.87 |
Media Library /wp-admin/upload.php | 1,419 ▲19 | 4.26 ▲0.00 | 99.12 ▼14.04 | 41.46 ▼6.08 |
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
You still need to fix the following
- This plugin did not uninstall successfully, leaving 6 options in the database
- theysaidso_admin_options
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
- 1× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/hm-wc-product-advertiser/front/view/hmwpa-front-view.php
- 2× PHP files trigger server errors when accessed directly:
- > PHP Warning
Use of undefined constant HMWPA_ASSETS - assumed 'HMWPA_ASSETS' (this will throw an Error in a future version of PHP) in wp-content/plugins/hm-wc-product-advertiser/front/view/hmwpa-front-view.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function stripslashes_deep() in wp-content/plugins/hm-wc-product-advertiser/admin/view/hmwpa-settings.php:13
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: ajax, woo-commerce, woocommerce, advertise, products
hm-wc-product-advertiser/hm-wc-product-advertiser.php Passed 13 tests
Analyzing the main PHP file in "Product Advertiser for WooCommerce" version 1.1
99 characters long description:
This plugin will display product randomly at the bottom right corner when scroll down your browser.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin581 lines of code in 12 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 47 | 41 | 372 |
CSS | 2 | 35 | 4 | 158 |
JavaScript | 2 | 13 | 23 | 51 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.23 |
Average class complexity | 7.25 |
▷ Minimum class complexity | 3.00 |
▷ Maximum class complexity | 18.00 |
Average method complexity | 2.04 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 7.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 4 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 24 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 19 | 79.17% |
▷ Protected methods | 2 | 8.33% |
▷ Private methods | 3 | 12.50% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 7 | |
▷ Global constants | 7 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/img/close.png | 1.58KB | 1.50KB | ▼ 5.19% |
assets/img/close_16.png | 4.40KB | 1.54KB | ▼ 65.07% |
assets/img/loading.png | 5.14KB | 0.63KB | ▼ 87.75% |
assets/img/wp-default.png | 8.01KB | 9.77KB | 0.00% |