Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲0.01MB] [CPU: ▼5.78ms] Passed 4 tests
An overview of server-side resources used by Add JavaScript attributes
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 39.71 ▼1.92 |
Dashboard /wp-admin | 3.31 ▲0.01 | 45.03 ▼2.52 |
Posts /wp-admin/edit.php | 3.36 ▲0.01 | 43.67 ▼6.36 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.01 | 83.71 ▼12.31 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 36.81 ▲1.80 |
Server storage [IO: ▲0.08MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
db_upgraded |
theysaidso_admin_options |
widget_recent-comments |
can_compress_scripts |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
Add JavaScript attributes: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,816 ▲81 | 13.23 ▼1.15 | 1.74 ▲0.00 | 42.25 ▼6.78 |
Dashboard /wp-admin | 2,222 ▲34 | 5.79 ▼0.10 | 104.21 ▲4.48 | 54.36 ▲8.80 |
Posts /wp-admin/edit.php | 2,105 ▲16 | 1.99 ▼0.02 | 33.62 ▼8.94 | 35.92 ▲0.12 |
Add New Post /wp-admin/post-new.php | 1,527 ▼2 | 17.73 ▼0.46 | 656.11 ▲17.86 | 49.01 ▼7.64 |
Media Library /wp-admin/upload.php | 1,404 ▲16 | 4.23 ▲0.02 | 108.84 ▲8.12 | 47.26 ▲4.38 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
- Zombie WordPress options were found after uninstall: 6 options
- db_upgraded
- can_compress_scripts
- widget_recent-comments
- widget_theysaidso_widget
- widget_recent-posts
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested
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 fix the following items
- 1× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-javascript-attributes/add-javascript-attributes.php:13
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
- Screenshots: These screenshots require images: #1 (Front-end of JavaScript attribute added.), #2 (Admin side JavaScript attributes added.)
add-javascript-attributes/add-javascript-attributes.php 92% from 13 tests
Analyzing the main PHP file in "Add JavaScript attributes" version 1.0
You should first fix the following items:
- Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
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
Success! There were no dangerous files found in this plugin98 lines of code in 1 file:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 11 | 10 | 98 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.06 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 4 | |
▷ Named functions | 4 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/icon-128x128.png | 11.51KB | 5.73KB | ▼ 50.21% |
(invalid) assets/banner-772x250.png | 27.44KB | 0.00KB | ▼ 100.00% |
assets/icon-256x256.png | 34.22KB | 16.54KB | ▼ 51.66% |