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
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▼1.08MB] [CPU: ▼185.77ms] Passed 4 tests
An overview of server-side resources used by Amazon JS
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.53 ▼0.31 | 18.18 ▼28.33 |
Dashboard /wp-admin | 2.58 ▼0.49 | 12.09 ▼26.78 |
Posts /wp-admin/edit.php | 2.58 ▼0.53 | 12.18 ▼18.93 |
Add New Post /wp-admin/post-new.php | 2.58 ▼2.86 | 11.01 ▼669.04 |
Media Library /wp-admin/upload.php | 2.58 ▼0.43 | 11.21 ▼11.53 |
AmazonJS /wp-admin/options-general.php?page=amazonjs | 2.58 | 10.97 |
Server storage [IO: ▲0.24MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
An overview of browser requirements for Amazon JS
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,678 ▲77 | 15.91 ▲0.12 | 4.85 ▼0.80 | 74.74 ▼1.24 |
Dashboard /wp-admin | 2,940 ▲47 | 6.12 ▼0.05 | 114.43 ▼16.09 | 160.71 ▼18.58 |
Posts /wp-admin/edit.php | 2,750 ▲10 | 3.24 ▼0.00 | 64.96 ▼1.62 | 138.18 ▼3.27 |
Add New Post /wp-admin/post-new.php | 3,743 ▼70 | 18.90 ▼0.23 | 456.09 ▲11.17 | 160.56 ▼0.57 |
Media Library /wp-admin/upload.php | 1,758 ▲6 | 5.50 ▼0.03 | 149.30 ▲12.83 | 183.57 ▲3.06 |
AmazonJS /wp-admin/options-general.php?page=amazonjs | 1,434 | 2.36 | 56.05 | 134.67 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
- This plugin cannot be uninstalled
- > Notice in wp-content/plugins/amazonjs/amazonjs.php+439
Undefined index: defaults
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
- 19 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=amazonjs
- > Notice in wp-content/plugins/amazonjs/amazonjs.php+439
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/amazonjs/amazonjs.php+748
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/amazonjs/amazonjs.php+761
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
- 1× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/amazonjs/media-upload-type-amazonjs.php:8
- > 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 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
- Screenshots: Screenshot #1 (Click the gray Amazon icon to go to search form in editing entry page.) image missing
amazonjs/amazonjs.php Passed 13 tests
"Amazon JS" version 0.10's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
100 characters long description:
Easy to use interface to add an amazon product to your post and display it by using jQuery template.
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
There were no executable files found in this plugin4,110 lines of code in 17 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 330 | 430 | 2,897 |
JavaScript | 3 | 12 | 14 | 443 |
CSS | 4 | 9 | 2 | 374 |
PO File | 1 | 144 | 146 | 373 |
Markdown | 1 | 15 | 0 | 23 |
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.42 |
Average class complexity | 48.43 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 161.00 |
Average method complexity | 4.39 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 67.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 98 | |
▷ Static methods | 20 | 20.41% |
▷ Public methods | 78 | 79.59% |
▷ Protected methods | 3 | 3.06% |
▷ Private methods | 17 | 17.35% |
Functions | 7 | |
▷ Named functions | 7 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 13 | |
▷ Global constants | 7 | 53.85% |
▷ Class constants | 6 | 46.15% |
▷ Public constants | 6 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
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 |
images/amazonjs.png | 1.77KB | 1.33KB | ▼ 25.18% |
screenshot-1.png | 12.23KB | 5.55KB | ▼ 54.64% |
images/amazon-icon.png | 0.49KB | 0.47KB | ▼ 3.39% |