Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully
Server metrics [RAM: ▼1.49MB] [CPU: ▼333.43ms] Passed 4 tests
Analyzing server-side resources used by Amazon Block
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.95 ▼0.56 | 18.17 ▼33.52 |
Dashboard /wp-admin | 2.87 ▼0.54 | 14.83 ▼19.40 |
Posts /wp-admin/edit.php | 2.87 ▼0.77 | 13.54 ▼23.40 |
Add New Post /wp-admin/post-new.php | 2.87 ▼4.10 | 13.71 ▼1,257.38 |
Media Library /wp-admin/upload.php | 2.87 ▼0.43 | 14.92 ▼9.06 |
AmazonJS /wp-admin/options-general.php?page=amazonjs | 2.87 | 14.73 |
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, no new options
Browser metrics Passed 4 tests
Checking browser requirements for Amazon Block
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,803 ▲49 | 15.90 ▲0.25 | 6.24 ▼0.27 | 2.39 ▼0.02 |
Dashboard /wp-admin | 2,897 ▲43 | 6.11 ▼0.07 | 120.35 ▼11.49 | 159.04 ▼5.78 |
Posts /wp-admin/edit.php | 2,693 ▼1 | 3.36 ▲0.13 | 64.69 ▲2.97 | 144.38 ▲3.75 |
Add New Post /wp-admin/post-new.php | 1,673 ▼17 | 17.36 ▼3.25 | 419.89 ▼49.99 | 154.92 ▼5.15 |
Media Library /wp-admin/upload.php | 1,703 ▲2 | 5.51 ▼0.03 | 155.47 ▲18.04 | 196.46 ▲9.73 |
AmazonJS /wp-admin/options-general.php?page=amazonjs | 1,347 | 2.54 | 55.15 | 137.94 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
- This plugin did not uninstall without warnings or errors
- > Notice in wp-content/plugins/add-amazon-block/lib/amazonjs/amazonjs.php+371
Undefined index: defaults
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
- 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
- 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_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
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
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 93% from 29 tests
readme.txt 94% 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 need to be fixed:
- Donate link: Invalid URI ("")
add-amazon-block/index.php 92% from 13 tests
"Amazon Block" version 0.2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
- Main file name: The principal plugin file should be 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 | Executable files are not allowed as they can serve as attack vectors
There were no executable 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
An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
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
All PNG images should be compressed to minimize bandwidth usage for end users
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/amazon-icon.png | 0.49KB | 0.47KB | ▼ 3.39% |
lib/amazonjs/screenshot-1.png | 12.23KB | 5.55KB | ▼ 54.64% |
lib/amazonjs/images/amazonjs.png | 1.77KB | 1.33KB | ▼ 25.18% |