Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
- Install procedure had errors
- > Deprecated in wp-content/plugins/amazon-related-products/units/grid/functions.php+83
Function create_function() is deprecated
Server metrics [RAM: ▼1.70MB] [CPU: ▼56.36ms] Passed 4 tests
Analyzing server-side resources used by Amazon Related Products
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.29 ▼1.17 | 7.57 ▼35.39 |
Dashboard /wp-admin | 2.31 ▼0.99 | 8.66 ▼47.39 |
Posts /wp-admin/edit.php | 2.31 ▼1.05 | 10.25 ▼43.33 |
Add New Post /wp-admin/post-new.php | 2.31 ▼3.58 | 8.22 ▼99.34 |
Media Library /wp-admin/upload.php | 2.31 ▼0.92 | 8.07 ▼31.86 |
Amazon Related Products /wp-admin/options-general.php?page=amz-related-products | 2.31 | 8.15 |
Server storage [IO: ▲0.30MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options |
---|
can_compress_scripts |
theysaidso_admin_options |
widget_recent-posts |
db_upgraded |
widget_amzrp_widget |
widget_recent-comments |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
Checking browser requirements for Amazon Related Products
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,829 ▲83 | 14.48 ▲0.10 | 1.97 ▲0.04 | 41.50 ▼0.80 |
Dashboard /wp-admin | 2,210 ▲25 | 4.85 ▼0.02 | 112.36 ▲6.55 | 39.36 ▼6.38 |
Posts /wp-admin/edit.php | 2,096 ▲7 | 2.06 ▲0.07 | 42.77 ▼1.46 | 38.17 ▲1.29 |
Add New Post /wp-admin/post-new.php | 1,517 ▼16 | 17.54 ▼5.41 | 659.50 ▲28.36 | 59.12 ▲8.86 |
Media Library /wp-admin/upload.php | 1,389 ▲1 | 4.24 ▲0.10 | 111.00 ▼4.35 | 48.44 ▲6.22 |
Amazon Related Products /wp-admin/options-general.php?page=amz-related-products | 1,360 | 1.69 | 27.97 | 32.52 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
- Uninstall procedure had uncaught errors
- > Deprecated in wp-content/plugins/amazon-related-products/units/grid/functions.php+83
Function create_function() is deprecated
- This plugin did not uninstall successfully, leaving 7 options in the database
- theysaidso_admin_options
- widget_recent-comments
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
- can_compress_scripts
- widget_amzrp_widget
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
- 3 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=amz-related-products
- > Deprecated in wp-content/plugins/amazon-related-products/functions.php+666
Function create_function() is deprecated
- > GET request to /wp-admin/options-general.php?page=amz-related-products
- > Notice in wp-content/plugins/amazon-related-products/includes/amzrp_regions.php+314
Undefined variable: search_index_arr
- > GET request to /wp-admin/options-general.php?page=amz-related-products
- > Notice in wp-content/plugins/amazon-related-products/includes/amzrp_regions.php+314
Trying to access array offset on value of type null
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
Please fix the following items
- 8× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/amazon-related-products/includes/class.amzrp_widget.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/amazon-related-products/includes/class.amzrp_units.php:11
- > PHP Fatal error
Uncaught Error: Class 'AMZRP_UNIT' not found in wp-content/plugins/amazon-related-products/units/grid/functions.php:9
- > PHP Warning
Use of undefined constant AMZRP_VERSION - assumed 'AMZRP_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/amazon-related-products/functions.php on line 47
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/amazon-related-products/includes/amzrp_regions.php:9
- > PHP Fatal error
Uncaught Error: Class 'AMZRP_UNIT' not found in wp-content/plugins/amazon-related-products/units/list/functions.php:9
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/amazon-related-products/functions.php:56
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/amazon-related-products/amazon-related-products.php:28
- > 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 93% from 29 tests
readme.txt 88% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
- Screenshots: These screenshots require images: #1 (Amazon Related Products Button), #2 (Amazon Related Products Example)
- Tags: You are using too many tags: 15 tag instead of maximum 10
amazon-related-products/amazon-related-products.php Passed 13 tests
This is the main PHP file of "Amazon Related Products" version 0.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
52 characters long description:
Insert contextual Amazon products into your content.
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
Good job! No executable or dangerous file extensions detected1,655 lines of code in 13 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 457 | 194 | 1,381 |
JavaScript | 2 | 48 | 10 | 152 |
CSS | 3 | 30 | 17 | 122 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 11.67 |
▷ Minimum class complexity | 4.00 |
▷ Maximum class complexity | 31.00 |
Average method complexity | 2.60 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 12.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 6 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 6 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 40 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 38 | 95.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 2 | 5.00% |
Functions | 28 | |
▷ Named functions | 28 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 5 | |
▷ Global constants | 5 | 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
5 PNG files occupy 0.23MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/units/list.png | 17.27KB | 4.79KB | ▼ 72.26% |
screenshot-1.png | 40.70KB | 16.46KB | ▼ 59.56% |
images/amz-related-products.png | 0.62KB | 0.45KB | ▼ 27.80% |
images/units/grid.png | 28.58KB | 12.35KB | ▼ 56.79% |
screenshot-2.png | 147.98KB | 36.86KB | ▼ 75.09% |