Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully
Server metrics [RAM: ▲0.93MB] [CPU: ▲4.48ms] 75% from 4 tests
Server-side resources used by CM Product Recommendations
It is recommended to improve the following
- CPU: Total CPU usage must kept under 500.00ms (currently 1,236.98ms on /wp-admin/edit.php?post_type=cm_product_recommend&page=cmcrpr_settings)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.40 ▲0.93 | 43.35 ▼0.82 |
Dashboard /wp-admin | 4.24 ▲0.93 | 56.34 ▲3.45 |
Posts /wp-admin/edit.php | 4.29 ▲0.93 | 63.54 ▲14.85 |
Add New Post /wp-admin/post-new.php | 6.84 ▲0.95 | 101.78 ▲10.20 |
Media Library /wp-admin/upload.php | 4.16 ▲0.93 | 42.67 ▲5.10 |
Products /wp-admin/edit.php?post_type=cm_product_recommend | 4.21 | 45.14 |
Upgrade ➤ /wp-admin/edit.php?post_type=cm_product_recommend&page=cmcrpr_pro | 4.11 | 38.64 |
Settings /wp-admin/edit.php?post_type=cm_product_recommend&page=cmcrpr_settings | 4.34 | 1,236.98 |
User Guide /wp-admin/edit.php?post_type=cm_product_recommend&page=cmcrpr_about | 4.28 | 400.36 |
Add New /wp-admin/post-new.php?post_type=cm_product_recommend | 4.23 | 61.70 |
Server storage [IO: ▲1.08MB] [DB: ▲0.01MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 89 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_theysaidso_widget |
cmcrpr_options |
db_upgraded |
widget_recent-comments |
can_compress_scripts |
widget_recent-posts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
Checking browser requirements for CM Product Recommendations
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,844 ▲73 | 14.74 ▲0.78 | 1.59 ▼0.25 | 38.96 ▼3.02 |
Dashboard /wp-admin | 2,245 ▲57 | 4.82 ▼1.08 | 122.65 ▲10.99 | 51.49 ▲7.54 |
Posts /wp-admin/edit.php | 2,135 ▲46 | 2.44 ▲0.43 | 72.97 ▲36.97 | 40.15 ▲1.40 |
Add New Post /wp-admin/post-new.php | 1,584 ▲51 | 23.13 ▼0.10 | 663.13 ▲1.81 | 33.08 ▼15.77 |
Media Library /wp-admin/upload.php | 1,427 ▲42 | 4.22 ▼0.01 | 102.73 ▼31.09 | 43.86 ▼4.82 |
Products /wp-admin/edit.php?post_type=cm_product_recommend | 1,122 | 2.38 | 36.64 | 45.23 |
Upgrade ➤ /wp-admin/edit.php?post_type=cm_product_recommend&page=cmcrpr_pro | 1,649 | 2.26 | 56.01 | 96.71 |
Settings /wp-admin/edit.php?post_type=cm_product_recommend&page=cmcrpr_settings | 2,749 | 8.46 | 90.48 | 133.98 |
User Guide /wp-admin/edit.php?post_type=cm_product_recommend&page=cmcrpr_about | 3,926 | 16.81 | 482.69 | 190.40 |
Add New /wp-admin/post-new.php?post_type=cm_product_recommend | 1,699 | 4.09 | 72.92 | 37.06 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- This plugin did not uninstall successfully, leaving 7 options in the database
- widget_recent-comments
- db_upgraded
- theysaidso_admin_options
- cmcrpr_options
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-posts
Smoke tests 0% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
- 13 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=cm_product_recommend
- > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
- > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
Undefined offset: 0
- 13 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=cm_product_recommend
- > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
- > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
Trying to get property 'guid' of non-object
- 51 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=cm_product_recommend
- > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
- > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+221
Trying to get property 'ID' of non-object
- 12 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=cm_product_recommend
- > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
- > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
Trying to get property 'post_title' of non-object
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
- 2× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/cm-context-related-product-recommendations/views/backend/admin_about.php
- > /wp-content/plugins/cm-context-related-product-recommendations/views/backend/admin_nav.php
- 14× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/cm-context-related-product-recommendations/package/views/plugin_compare_table.php:51
- > PHP Notice
Undefined variable: submenus in wp-content/plugins/cm-context-related-product-recommendations/views/backend/admin_nav.php on line 5
- > PHP Fatal error
Uncaught Error: Call to undefined function do_shortcode() in wp-content/plugins/cm-context-related-product-recommendations/views/backend/admin_settings.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cm-context-related-product-recommendations/cm-context-related-product-recommendations.php:121
- > PHP Warning
Use of undefined constant CMTOC_NAME - assumed 'CMTOC_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/cm-context-related-product-recommendations/views/backend/admin_about.php on line 6
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cm-context-related-product-recommendations/package/cminds-plugin-config.php:4
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cm-context-related-product-recommendations/package/cminds-plugin-config.php:4
- > PHP Fatal error
Uncaught Error: Class 'CMCRPR_Base' not found in wp-content/plugins/cm-context-related-product-recommendations/views/backend/admin_template.php:6
- > PHP Warning
Use of undefined constant CMTOC_URL - assumed 'CMTOC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/cm-context-related-product-recommendations/views/backend/admin_about.php on line 6
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/cm-context-related-product-recommendations/package/views/registration.php:42
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
- > GET request to /wp-admin/edit.php?post_type=cm_product_recommend&page=cmcrpr_about
- > Security (warning) in unknown
security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
- > GET request to /wp-admin/edit.php?post_type=cm_product_recommend&page=cmcrpr_about
- > Security (warning) in unknown
security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.
- > GET request to /wp-admin/edit.php?post_type=cm_product_recommend&page=cmcrpr_about
- > Deprecation (warning) in unknown
https://static.xx.fbcdn.net/rsrc.php/v3/yx/r/RBH7b7zeA6F.js?_nc_x=Ij3Wp8lg5Kz 271 Listener added for a synchronous 'DOMSubtreeModified' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.
- > GET request to /wp-admin/edit.php?post_type=cm_product_recommend&page=cmcrpr_about
- > Console-api (severe) in unknown
https://static.xx.fbcdn.net/rsrc.php/v3/yx/r/RBH7b7zeA6F.js?_nc_x=Ij3Wp8lg5Kz 60:573 "ErrorUtils caught an error:\n\nCannot listen to an undefined element. [Caught in: Tried to listen to element of type click]\n\nSubsequent non-fatal errors won't be logged; see https://fburl.com/debugjs."
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: products widget, recommended products, products, recommendations, product
cm-context-related-product-recommendations/cm-context-related-product-recommendations.php Passed 13 tests
The principal PHP file in "CM Product Recommendations" v. 1.1.3 is loaded by WordPress automatically on each request
109 characters long description:
Parses posts for defined recommended products and adds the widget with the image, short definition and links.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin8,675 lines of code in 28 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 18 | 1,135 | 929 | 6,221 |
CSS | 5 | 161 | 50 | 1,677 |
JavaScript | 5 | 99 | 45 | 777 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.35 |
Average class complexity | 63.50 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 254.00 |
Average method complexity | 4.26 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 38.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 8 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 8 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 153 | |
▷ Static methods | 78 | 50.98% |
▷ Public methods | 143 | 93.46% |
▷ Protected methods | 10 | 6.54% |
▷ Private methods | 0 | 0.00% |
Functions | 9 | |
▷ Named functions | 9 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 29 | |
▷ Global constants | 20 | 68.97% |
▷ Class constants | 9 | 31.03% |
▷ Public constants | 9 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
54 PNG files occupy 0.57MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/css/images/ui-bg_glass_65_ffffff_1x400.png | 0.20KB | 0.09KB | ▼ 57.49% |
assets/css/images/ui-bg_flat_75_ffffff_40x100.png | 0.20KB | 0.08KB | ▼ 58.17% |
package/css/images/ui-bg_glass_65_ffffff_1x400.png | 0.20KB | 0.09KB | ▼ 57.49% |
package/views/img/v2.png | 0.38KB | 0.37KB | ▼ 1.79% |
assets/css/images/ui-bg_glass_75_e6e6e6_1x400.png | 0.26KB | 0.15KB | ▼ 42.37% |