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
Installer ran successfully
Server metrics [RAM: ▲0.03MB] [CPU: ▼0.05ms] Passed 4 tests
This is a short check of server-side resources used by TC Custom JavaScript
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 46.61 ▲5.64 |
Dashboard /wp-admin | 3.33 ▲0.03 | 54.22 ▼2.11 |
Posts /wp-admin/edit.php | 3.38 ▲0.03 | 49.54 ▼2.31 |
Add New Post /wp-admin/post-new.php | 5.91 ▲0.03 | 103.58 ▲1.22 |
Media Library /wp-admin/upload.php | 3.25 ▲0.03 | 37.31 ▲2.99 |
Custom JavaScript /wp-admin/themes.php?page=tc-custom-javascript | 3.22 | 34.31 |
Server storage [IO: ▲3.99MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 431 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-comments |
tccj_do_activation_redirect |
can_compress_scripts |
widget_recent-posts |
widget_theysaidso_widget |
db_upgraded |
theysaidso_admin_options |
Browser metrics Passed 4 tests
TC Custom JavaScript: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,818 ▲57 | 14.44 ▲0.07 | 2.24 ▲0.59 | 48.63 ▲6.78 |
Dashboard /wp-admin | 2,199 ▲34 | 5.62 ▲0.07 | 86.47 ▼4.05 | 38.29 ▼8.50 |
Posts /wp-admin/edit.php | 2,104 ▲4 | 1.97 ▼0.05 | 40.74 ▲3.59 | 36.81 ▲1.81 |
Add New Post /wp-admin/post-new.php | 1,529 ▼16 | 17.57 ▼5.65 | 587.45 ▼67.62 | 58.44 ▲6.77 |
Media Library /wp-admin/upload.php | 1,401 ▲1 | 4.22 ▲0.04 | 95.14 ▼13.02 | 42.61 ▼4.78 |
Custom JavaScript /wp-admin/themes.php?page=tc-custom-javascript | 974 | 2.42 | 37.97 | 60.83 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- This plugin does not fully uninstall, leaving 7 options in the database
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
- widget_recent-comments
- tccj_do_activation_redirect
- theysaidso_admin_options
- can_compress_scripts
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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/tc-custom-javascript/tc-custom-javascript.php
- 4× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
require_once(): Failed opening required 'TCCJ_PLUGIN_DIRcore/asset.php' (include_path='.:/usr/share/php') in wp-content/plugins/tc-custom-javascript/core/plugin.php on line 3
- > PHP Warning
require_once(TCCJ_PLUGIN_DIRcore/asset.php): failed to open stream: No such file or directory in wp-content/plugins/tc-custom-javascript/core/plugin.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/tc-custom-javascript/templates/code-editor.php:2
- > PHP Warning
Use of undefined constant TCCJ_PLUGIN_DIR - assumed 'TCCJ_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/tc-custom-javascript/core/plugin.php on line 3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: javascript editor, edit js theme, custom javascript, custom js
tc-custom-javascript/tc-custom-javascript.php 92% from 13 tests
The main file in "TC Custom JavaScript" v. 1.2.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
- Description: Keep the plugin description shorter than 140 characters (currently 188 characters long)
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
No dangerous file extensions were detected79,141 lines of code in 414 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 191 | 5,747 | 3,908 | 50,006 |
HTML | 156 | 3,234 | 12 | 19,453 |
CSS | 52 | 340 | 199 | 8,969 |
SVG | 2 | 1 | 1 | 467 |
PHP | 7 | 23 | 18 | 132 |
Markdown | 2 | 19 | 0 | 69 |
JSON | 2 | 0 | 0 | 37 |
Bourne Shell | 1 | 0 | 1 | 5 |
YAML | 1 | 0 | 0 | 3 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.29 |
Average class complexity | 4.00 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 10.00 |
Average method complexity | 2.67 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 7.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 5 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 5 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 9 | |
▷ Static methods | 9 | 100.00% |
▷ Public methods | 8 | 88.89% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 11.11% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 4 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/codemirror/doc/yinyang.png | 4.52KB | 2.03KB | ▼ 55.19% |
assets/codemirror/doc/logo.png | 9.09KB | 4.10KB | ▼ 54.95% |