Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.18MB] [CPU: ▼6.79ms] Passed 4 tests
Analyzing server-side resources used by Add Admin JavaScript
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.65 ▲0.19 | 43.09 ▲6.94 |
Dashboard /wp-admin | 3.50 ▲0.16 | 48.25 ▼10.28 |
Posts /wp-admin/edit.php | 3.61 ▲0.26 | 43.32 ▼5.95 |
Add New Post /wp-admin/post-new.php | 6.08 ▲0.20 | 84.56 ▼11.73 |
Media Library /wp-admin/upload.php | 3.42 ▲0.20 | 35.14 ▲0.81 |
Admin JavaScript /wp-admin/options-general.php?page=add-admin-javascript/add-admin-javascript.php | 3.42 | 32.57 |
Server storage [IO: ▲0.13MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
widget_recent-posts |
theysaidso_admin_options |
db_upgraded |
widget_theysaidso_widget |
can_compress_scripts |
Browser metrics Passed 4 tests
An overview of browser requirements for Add Admin JavaScript
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲69 | 13.28 ▼0.96 | 1.71 ▼0.17 | 43.63 ▲2.44 |
Dashboard /wp-admin | 2,210 ▲19 | 4.86 ▼0.05 | 104.67 ▼1.85 | 42.21 ▲1.43 |
Posts /wp-admin/edit.php | 2,093 ▲7 | 2.00 ▼0.05 | 36.40 ▼2.13 | 29.81 ▼5.06 |
Add New Post /wp-admin/post-new.php | 1,545 ▲12 | 18.61 ▼4.42 | 659.29 ▼1.28 | 46.88 ▼4.67 |
Media Library /wp-admin/upload.php | 1,392 ▲10 | 4.19 ▼0.05 | 96.68 ▼1.02 | 43.14 ▲1.05 |
Admin JavaScript /wp-admin/options-general.php?page=add-admin-javascript/add-admin-javascript.php | 1,163 | 3.75 | 86.91 | 49.62 |
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
- Zombie WordPress options detected upon uninstall: 6 options
- theysaidso_admin_options
- widget_theysaidso_widget
- can_compress_scripts
- db_upgraded
- widget_recent-comments
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 0% 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 output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/add-admin-javascript/tests/phpunit/bootstrap.php
- 2× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Warning
require_once(/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/add-admin-javascript/tests/phpunit/bootstrap.php on line 19
- > PHP Fatal error
require_once(): Failed opening required '/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/add-admin-javascript/tests/phpunit/bootstrap.php on line 19
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: javascript, admin theme, script, coffee2code, js...
add-admin-javascript/add-admin-javascript.php Passed 13 tests
This is the main PHP file of "Add Admin JavaScript" version 2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
115 characters long description:
Interface for easily defining additional JavaScript (inline and/or by URL) to be added to all administration pages.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,790 lines of code in 11 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 6 | 394 | 667 | 1,424 |
Markdown | 3 | 56 | 0 | 331 |
Bourne Shell | 1 | 6 | 2 | 21 |
XML | 1 | 0 | 0 | 14 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.34 |
Average class complexity | 48.75 |
▷ Minimum class complexity | 3.00 |
▷ Maximum class complexity | 140.00 |
Average method complexity | 2.46 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 38.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 1 | 25.00% |
▷ Concrete classes | 3 | 75.00% |
▷ Final classes | 1 | 33.33% |
Methods | 133 | |
▷ Static methods | 8 | 6.02% |
▷ Public methods | 120 | 90.23% |
▷ Protected methods | 13 | 9.77% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 5 | |
▷ Global constants | 3 | 60.00% |
▷ Class constants | 2 | 40.00% |
▷ Public constants | 2 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
c2c_minilogo.png | 3.49KB | 1.91KB | ▼ 45.43% |