Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.18MB] [CPU: ▼296.26ms] Passed 4 tests
This is a short check of server-side resources used by Add Admin JavaScript
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.77 ▲0.65 | 53.68 ▲36.03 |
Dashboard /wp-admin | 3.62 ▲0.21 | 38.58 ▲3.20 |
Posts /wp-admin/edit.php | 3.84 ▲0.20 | 38.19 ▲0.54 |
Add New Post /wp-admin/post-new.php | 7.08 ▲0.11 | 94.44 ▼1,190.39 |
Media Library /wp-admin/upload.php | 3.49 ▲0.19 | 27.86 ▲1.62 |
Admin JavaScript /wp-admin/options-general.php?page=add-admin-javascript/add-admin-javascript.php | 3.49 | 24.83 |
Server storage [IO: ▲0.13MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
A check of browser resources used by Add Admin JavaScript
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,777 ▲23 | 15.67 ▲0.10 | 6.31 ▼0.19 | 2.65 ▲0.11 |
Dashboard /wp-admin | 2,883 ▲29 | 6.10 ▼0.04 | 118.31 ▼19.27 | 155.86 ▼3.84 |
Posts /wp-admin/edit.php | 2,693 ▲4 | 3.24 ▲0.00 | 64.22 ▼0.77 | 143.17 ▲2.49 |
Add New Post /wp-admin/post-new.php | 1,761 ▲3 | 21.42 ▼0.06 | 433.81 ▼15.19 | 156.80 ▼0.60 |
Media Library /wp-admin/upload.php | 1,703 ▲2 | 5.50 ▼0.03 | 155.03 ▲16.00 | 205.81 ▲24.55 |
Admin JavaScript /wp-admin/options-general.php?page=add-admin-javascript/add-admin-javascript.php | 1,418 | 4.46 | 118.67 | 180.45 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected
SRP 0% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/add-admin-javascript/tests/phpunit/bootstrap.php
- 2× PHP files trigger errors when accessed directly with GET requests:
- > 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 just a short smoke test looking for browser issues
No browser errors were detected
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: javascript, js, customization, script, coffee2code...
add-admin-javascript/add-admin-javascript.php Passed 13 tests
The principal PHP file in "Add Admin JavaScript" v. 2.0 is loaded by WordPress automatically on each request
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 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,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
No cyclomatic complexity issues were detected for this plugin
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
Using a strong compression for your PNG files is a great way to speed-up 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% |