Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully
Server metrics [RAM: ▼1.01MB] [CPU: ▼39.66ms] Passed 4 tests
Analyzing server-side resources used by Global Javascript
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.82 ▼0.65 | 14.53 ▼27.83 |
Dashboard /wp-admin | 3.05 ▼0.26 | 28.92 ▼20.52 |
Posts /wp-admin/edit.php | 3.05 ▼0.31 | 24.18 ▼24.44 |
Add New Post /wp-admin/post-new.php | 3.05 ▼2.84 | 22.13 ▼85.85 |
Media Library /wp-admin/upload.php | 3.05 ▼0.18 | 23.99 ▼12.27 |
Global Javascript /wp-admin/themes.php?page=global-javascript/global-javascript.php | 3.05 | 25.67 |
Server storage [IO: ▲3.61MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 151 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-comments |
widget_recent-posts |
theysaidso_admin_options |
db_upgraded |
Browser metrics Passed 4 tests
A check of browser resources used by Global Javascript
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲69 | 13.22 ▼1.16 | 1.65 ▼0.76 | 47.48 ▼17.38 |
Dashboard /wp-admin | 2,210 ▲22 | 4.87 ▼0.01 | 109.72 ▼7.95 | 42.42 ▲1.43 |
Posts /wp-admin/edit.php | 2,096 ▲4 | 2.02 ▲0.01 | 60.39 ▲18.87 | 38.36 ▲6.05 |
Add New Post /wp-admin/post-new.php | 1,522 ▼11 | 23.40 ▲0.43 | 647.74 ▼12.40 | 56.43 ▼19.43 |
Media Library /wp-admin/upload.php | 1,386 ▼2 | 4.18 ▲0.01 | 100.94 ▼6.84 | 42.14 ▼4.21 |
Global Javascript /wp-admin/themes.php?page=global-javascript/global-javascript.php | 1,032 | 3.27 | 84.63 | 49.39 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- This plugin did not uninstall without warnings or errors
- > User deprecated in wp-includes/functions.php+5737
Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
- Zombie WordPress options were found after uninstall: 6 options
- widget_recent-comments
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-posts
- db_upgraded
- theysaidso_admin_options
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
- 2 occurences, only the last one shown
- > GET request to /wp-admin/themes.php?page=global-javascript/global-javascript.php
- > User deprecated in wp-includes/functions.php+5737
Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
- > GET request to /wp-admin/themes.php?page=global-javascript/global-javascript.php
- > Notice in wp-content/plugins/global-javascript/global-javascript.php+478
Undefined variable: error_id
- > GET request to /wp-admin/themes.php?page=global-javascript/global-javascript.php
- > Notice in wp-content/plugins/global-javascript/global-javascript.php+481
Undefined variable: message_number
- > GET request to /wp-admin/themes.php?page=global-javascript/global-javascript.php
- > Notice in wp-content/plugins/global-javascript/global-javascript.php+281
Only variables should be passed by reference
- 3 occurences, only the last one shown
- > GET request to /wp-admin/themes.php?page=global-javascript/global-javascript.php
- > Notice in wp-content/plugins/global-javascript/global-javascript.php+355
Trying to access array offset on value of type bool
- 3 occurences, only the last one shown
- > GET request to /wp-admin/themes.php?page=global-javascript/global-javascript.php
- > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
- > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
Undefined offset: 0
- 3 occurences, only the last one shown
- > GET request to /wp-admin/themes.php?page=global-javascript/global-javascript.php
- > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
- > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
Trying to get property 'guid' of non-object
- 12 occurences, only the last one shown
- > GET request to /wp-admin/themes.php?page=global-javascript/global-javascript.php
- > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
- > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+221
Trying to get property 'ID' of non-object
- 3 occurences, only the last one shown
- > GET request to /wp-admin/themes.php?page=global-javascript/global-javascript.php
- > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
- > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
Trying to get property 'post_title' of non-object
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
- 3× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/global-javascript/min/builder/index.php
- > /wp-content/plugins/global-javascript/min/index.php
- > /wp-content/plugins/global-javascript/min/builder/ocCheck.php
- 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Class 'Minify_Controller_Base' not found in wp-content/plugins/global-javascript/min/lib/Minify/Controller/Version1.php:17
- > PHP Fatal error
Uncaught Error: Class 'Minify_Controller_Base' not found in wp-content/plugins/global-javascript/min/lib/Minify/Controller/MinApp.php:13
- > PHP Fatal error
Uncaught Error: Class 'Minify_Controller_Base' not found in wp-content/plugins/global-javascript/min/lib/Minify/Controller/Files.php:27
- > PHP Fatal error
The script "class.JavaScriptPacker.php" is required. Please see: http://code.google.com/p/minify/source/browse/trunk/min/lib/Minify/Packer.php in wp-content/plugins/global-javascript/min/lib/Minify/Packer.php on line 21
- > PHP Fatal error
Uncaught Error: Class 'Minify_Controller_Base' not found in wp-content/plugins/global-javascript/min/lib/Minify/Controller/Groups.php:29
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/global-javascript/global-javascript.php:49
- > PHP Fatal error
Uncaught Error: Class 'Minify_Controller_Base' not found in wp-content/plugins/global-javascript/min/lib/Minify/Controller/Page.php:14
- > PHP Fatal error
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 90% from 29 tests
readme.txt 81% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
- Requires at least: Version not formatted correctly
- Tags: There are too many tags (20 tag instead of maximum 10)
- Donate link: Please fix this invalid URI: ""
global-javascript/global-javascript.php Passed 13 tests
Analyzing the main PHP file in "Global Javascript" version 1.0
72 characters long description:
Allows the creation and editing of Javascript on Wordpress powered sites
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin7,659 lines of code in 138 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 47 | 1,267 | 4,038 | 6,436 |
JavaScript | 88 | 228 | 100 | 961 |
Java | 1 | 74 | 77 | 231 |
CSS | 2 | 7 | 4 | 31 |
PHP code 50% from 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
Please tend to the following items
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 155)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.52 |
Average class complexity | 30.48 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 229.00 |
Average method complexity | 5.61 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 155.00 |
Code structure | ||
---|---|---|
Namespaces | 2 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 48 | |
▷ Abstract classes | 1 | 2.08% |
▷ Concrete classes | 47 | 97.92% |
▷ Final classes | 0 | 0.00% |
Methods | 308 | |
▷ Static methods | 64 | 20.78% |
▷ Public methods | 199 | 64.61% |
▷ Protected methods | 54 | 17.53% |
▷ Private methods | 55 | 17.86% |
Functions | 2 | |
▷ Named functions | 2 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 125 | |
▷ Global constants | 99 | 79.20% |
▷ Class constants | 26 | 20.80% |
▷ Public constants | 26 | 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
8 PNG files occupy 0.44MB with 0.30MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot 3.png | 79.04KB | 27.12KB | ▼ 65.68% |
screenshot 4.png | 16.61KB | 5.89KB | ▼ 64.53% |
screenshot 1.png | 120.96KB | 32.60KB | ▼ 73.05% |
screenshot-2.png | 10.53KB | 3.72KB | ▼ 64.70% |
screenshot-4.png | 16.61KB | 5.89KB | ▼ 64.53% |