Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
- This plugin did not install gracefully
- > Deprecated in wp-content/plugins/2kb-amazon-affiliates-store/store_functions.php+9
Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
Server metrics [RAM: ▼2.42MB] [CPU: ▼360.52ms] Passed 4 tests
A check of server-side resources used by 2kb Amazon Affiliates Store
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 1.95 ▼1.56 | 12.25 ▼44.21 |
Dashboard /wp-admin | 1.97 ▼1.44 | 4.54 ▼34.69 |
Posts /wp-admin/edit.php | 1.97 ▼1.67 | 4.97 ▼53.66 |
Add New Post /wp-admin/post-new.php | 1.97 ▼5.00 | 3.99 ▼1,309.52 |
Media Library /wp-admin/upload.php | 1.97 ▼1.32 | 51.87 ▲23.06 |
Server storage [IO: ▲2.45MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 96 new files
Database: no new tables, 4 new options
New WordPress options |
---|
widget_kbamazonshomproductcategories |
kbAmzStore |
widget_kbamzattr |
widget_kbamzsldr |
Browser metrics Passed 4 tests
2kb Amazon Affiliates Store: an overview of browser usage
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,935 ▲181 | 16.27 ▲0.62 | 10.02 ▲3.94 | 2.33 ▼0.25 |
Dashboard /wp-admin | 2,912 ▲51 | 6.17 ▲0.04 | 123.61 ▼12.38 | 176.45 ▼48.09 |
Posts /wp-admin/edit.php | 2,726 ▲35 | 3.10 ▼0.14 | 64.35 ▼2.42 | 150.09 ▲5.87 |
Add New Post /wp-admin/post-new.php | 1,649 ▼12 | 16.34 ▼6.43 | 413.56 ▼47.71 | 211.83 ▲48.06 |
Media Library /wp-admin/upload.php | 1,717 ▲22 | 5.54 ▲0.01 | 130.62 ▼20.20 | 211.36 ▲20.75 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
- The plugin did not uninstall gracefully
- > Deprecated in wp-content/plugins/2kb-amazon-affiliates-store/store_functions.php+9
Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
- Zombie WordPress options were found after uninstall: 4 options
- kbAmzStore
- widget_kbamzsldr
- widget_kbamzattr
- widget_kbamazonshomproductcategories
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
The following issues need your attention
- 1× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/2kb-amazon-affiliates-store/store_widgets.php:3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected
Optimizations
Plugin configuration 87% from 29 tests
readme.txt 88% from 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
Attributes that need to be fixed:
- Plugin Name: You should set the name of your plugin on the first line (
=== 2kb-amazon-affiliates-store ===
) - Contributors: The plugin contributors field is not present
2kb-amazon-affiliates-store/plugin.php 85% from 13 tests
The principal PHP file in "2kb Amazon Affiliates Store" v. 2.1.5 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("2kb-amazon-affiliates-store.php" instead of "plugin.php")
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 240 characters long)
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
There were no executable files found in this plugin24,473 lines of code in 69 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 54 | 1,255 | 2,410 | 13,098 |
CSS | 7 | 41 | 74 | 8,523 |
JavaScript | 6 | 783 | 285 | 2,469 |
SVG | 1 | 0 | 0 | 288 |
LESS | 1 | 1 | 8 | 95 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.51 |
Average class complexity | 58.28 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 555.00 |
Average method complexity | 3.99 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 59.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 1 | |
Traits | 0 | |
Classes | 28 | |
▷ Abstract classes | 2 | 7.14% |
▷ Concrete classes | 26 | 92.86% |
▷ Final classes | 0 | 0.00% |
Methods | 558 | |
▷ Static methods | 79 | 14.16% |
▷ Public methods | 486 | 87.10% |
▷ Protected methods | 69 | 12.37% |
▷ Private methods | 3 | 0.54% |
Functions | 89 | |
▷ Named functions | 89 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 21 | |
▷ Global constants | 8 | 38.10% |
▷ Class constants | 13 | 61.90% |
▷ Public constants | 13 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.13MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
template/admin/img/amazonCheckout.png | 5.23KB | 3.76KB | ▼ 27.98% |
template/admin/img/2kb-amazon-affiliate-product-logo.png | 123.46KB | 56.91KB | ▼ 53.91% |