Benchmarks
Plugin footprint 65% 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: ▼1.23MB] [CPU: ▼45.41ms] Passed 4 tests
A check of server-side resources used by Amazon Block
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.74 ▼0.72 | 15.07 ▼31.70 |
Dashboard /wp-admin | 2.78 ▼0.52 | 17.51 ▼32.83 |
Posts /wp-admin/edit.php | 2.78 ▼0.57 | 17.48 ▼33.54 |
Add New Post /wp-admin/post-new.php | 2.78 ▼3.10 | 17.61 ▼83.57 |
Media Library /wp-admin/upload.php | 2.78 ▼0.45 | 15.07 ▼24.22 |
AmazonJS /wp-admin/options-general.php?page=amazonjs | 2.78 | 18.77 |
Server storage [IO: ▲0.57MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 53 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-comments |
db_upgraded |
theysaidso_admin_options |
Browser metrics Passed 4 tests
Amazon Block: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,846 ▲85 | 13.26 ▼1.48 | 1.91 ▲0.06 | 37.35 ▼8.03 |
Dashboard /wp-admin | 2,225 ▲22 | 4.83 ▼0.99 | 111.93 ▲1.04 | 41.84 ▼1.02 |
Posts /wp-admin/edit.php | 2,104 ▲4 | 1.99 ▼0.00 | 38.71 ▲1.86 | 40.27 ▲4.63 |
Add New Post /wp-admin/post-new.php | 6,200 ▲4,655 | 19.17 ▼3.99 | 843.35 ▲168.37 | 51.29 ▼0.92 |
Media Library /wp-admin/upload.php | 1,404 ▲7 | 4.21 ▼0.02 | 98.26 ▼5.98 | 42.55 ▼3.95 |
AmazonJS /wp-admin/options-general.php?page=amazonjs | 1,057 | 2.06 | 26.43 | 36.01 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
- This plugin cannot be uninstalled
- > Notice in wp-content/plugins/add-amazon-block/lib/amazonjs/amazonjs.php+371
Undefined index: defaults
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-posts
- theysaidso_admin_options
- can_compress_scripts
- widget_theysaidso_widget
- db_upgraded
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
- 18 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=amazonjs
- > Notice in wp-content/plugins/add-amazon-block/lib/amazonjs/amazonjs.php+371
Undefined index: defaults
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=amazonjs
- > Notice in wp-content/plugins/add-amazon-block/lib/amazonjs/amazonjs.php+637
Undefined index: placeholder
- 12 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=amazonjs
- > Notice in wp-content/plugins/add-amazon-block/lib/amazonjs/amazonjs.php+650
Undefined index: description
SRP 50% 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
- 4× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-amazon-block/lib/amazonjs/amazonjs.php:984
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/add-amazon-block/lib/amazonjs/media-upload-type-amazonjs.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-amazon-block/lib/amazonjs/amazonjs.php:984
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-amazon-block/lib/amazonjs/amazonjs.php:984
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% 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:
- Donate link: Invalid URI ("Bitcoin( 3AqQnhQEXJ9tA8w54n7ZUiDdeRBrX2onsA )")
add-amazon-block/index.php 92% from 13 tests
"Amazon Block" version 0.2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("add-amazon-block.php" instead of "index.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
Everything looks great! No dangerous files found in this plugin9,524 lines of code in 39 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JSON | 3 | 0 | 0 | 5,420 |
PHP | 7 | 245 | 389 | 2,359 |
JavaScript | 22 | 64 | 29 | 965 |
CSS | 4 | 11 | 2 | 374 |
PO File | 1 | 141 | 143 | 373 |
Markdown | 1 | 16 | 0 | 23 |
XML | 1 | 3 | 0 | 10 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.43 |
Average class complexity | 46.20 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 115.00 |
Average method complexity | 5.11 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 67.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 5 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 5 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 55 | |
▷ Static methods | 4 | 7.27% |
▷ Public methods | 54 | 98.18% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 1.82% |
Functions | 9 | |
▷ Named functions | 9 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 11 | |
▷ Global constants | 7 | 63.64% |
▷ Class constants | 4 | 36.36% |
▷ Public constants | 4 | 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
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
lib/amazonjs/images/amazonjs.png | 1.77KB | 1.33KB | ▼ 25.18% |
lib/amazonjs/screenshot-1.png | 12.23KB | 5.55KB | ▼ 54.64% |
lib/amazonjs/images/amazon-icon.png | 0.49KB | 0.47KB | ▼ 3.39% |