Benchmarks
Plugin footprint 83% 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: ▲0.07MB] [CPU: ▼7.57ms] Passed 4 tests
A check of server-side resources used by CodeColorer
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.53 ▲0.07 | 40.09 ▲0.40 |
Dashboard /wp-admin | 3.42 ▲0.12 | 44.69 ▼3.84 |
Posts /wp-admin/edit.php | 3.47 ▲0.11 | 45.36 ▲2.06 |
Add New Post /wp-admin/post-new.php | 5.94 ▲0.05 | 83.99 ▼14.07 |
Media Library /wp-admin/upload.php | 3.28 ▲0.05 | 36.90 ▼12.75 |
Server storage [IO: ▲4.04MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 276 new files
Database: no new tables, 19 new options
New WordPress options |
---|
codecolorer_height |
codecolorer_css_class |
db_upgraded |
codecolorer_tab_size |
codecolorer_language_notification |
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-posts |
codecolorer_line_numbers |
codecolorer_width |
... |
Browser metrics Passed 4 tests
This is an overview of browser requirements for CodeColorer
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,816 ▲70 | 13.38 ▼0.67 | 1.65 ▼0.11 | 40.41 ▼4.53 |
Dashboard /wp-admin | 2,220 ▲29 | 5.88 ▼0.03 | 108.78 ▲7.60 | 39.00 ▼1.10 |
Posts /wp-admin/edit.php | 2,095 ▲6 | 2.05 ▲0.02 | 34.81 ▼2.54 | 35.05 ▲0.11 |
Add New Post /wp-admin/post-new.php | 1,521 ▼0 | 23.06 ▼0.12 | 699.49 ▲14.04 | 57.84 ▲5.75 |
Media Library /wp-admin/upload.php | 1,391 ▲9 | 4.17 ▼0.04 | 94.85 ▼7.60 | 41.83 ▼1.68 |
CodeColorer /wp-admin/codecolorer.php | 26 | 0.44 | 0.08 | 13.61 |
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
Please fix the following items
- This plugin does not fully uninstall, leaving 19 options in the database
- db_upgraded
- widget_recent-posts
- codecolorer_css_class
- codecolorer_concurrent_notification
- codecolorer_height
- codecolorer_tab_size
- widget_theysaidso_widget
- codecolorer_width
- codecolorer_lines_to_scroll
- codecolorer_theme
- ...
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
- 2127× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Warning
Use of undefined constant GESHI_AFTER - assumed 'GESHI_AFTER' (this will throw an Error in a future version of PHP) in wp-content/plugins/codecolorer/lib/geshi/typoscript.php on line 254
- > PHP Warning
Use of undefined constant GESHI_REPLACE - assumed 'GESHI_REPLACE' (this will throw an Error in a future version of PHP) in wp-content/plugins/codecolorer/lib/geshi/gdb.php on line 152
- > PHP Warning
Use of undefined constant GESHI_REPLACE - assumed 'GESHI_REPLACE' (this will throw an Error in a future version of PHP) in wp-content/plugins/codecolorer/lib/geshi/mk-61.php on line 93
- > PHP Warning
Use of undefined constant GESHI_COMMENTS - assumed 'GESHI_COMMENTS' (this will throw an Error in a future version of PHP) in wp-content/plugins/codecolorer/lib/geshi/c_winapi.php on line 790
- > PHP Warning
Use of undefined constant GESHI_AFTER - assumed 'GESHI_AFTER' (this will throw an Error in a future version of PHP) in wp-content/plugins/codecolorer/lib/geshi/reg.php on line 217
- > PHP Warning
Use of undefined constant GESHI_NEVER - assumed 'GESHI_NEVER' (this will throw an Error in a future version of PHP) in wp-content/plugins/codecolorer/lib/geshi/apt_sources.php on line 141
- > PHP Warning
Use of undefined constant GESHI_NUMBER_HEX_PREFIX - assumed 'GESHI_NUMBER_HEX_PREFIX' (this will throw an Error in a future version of PHP) in wp-content/plugins/codecolorer/lib/geshi/upc.php on line 68
- > PHP Warning
Use of undefined constant GESHI_NUMBER_BIN_PREFIX_0B - assumed 'GESHI_NUMBER_BIN_PREFIX_0B' (this will throw an Error in a future version of PHP) in wp-content/plugins/codecolorer/lib/geshi/python.php on line 55
- > PHP Warning
Use of undefined constant GESHI_BEFORE - assumed 'GESHI_BEFORE' (this will throw an Error in a future version of PHP) in wp-content/plugins/codecolorer/lib/geshi/biblatex.php on line 155
- > PHP Warning
Use of undefined constant GESHI_NUMBER_FLT_NONSCI_F - assumed 'GESHI_NUMBER_FLT_NONSCI_F' (this will throw an Error in a future version of PHP) in wp-content/plugins/codecolorer/lib/geshi/autoconf.php on line 468
- > PHP Warning
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
- > GET request to /wp-admin/codecolorer.php
- > Network (severe)
wp-admin/codecolorer.php - Failed to load resource: the server responded with a status of 404 (Not Found)
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: color, snippet, highlighting, geshi, syntax...
codecolorer/codecolorer.php 92% from 13 tests
The main PHP file in "CodeColorer" ver. 0.10.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 289 characters long)
Code Analysis 97% from 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 plugin71,860 lines of code in 270 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 262 | 2,066 | 14,818 | 71,300 |
CSS | 2 | 16 | 26 | 258 |
JavaScript | 5 | 38 | 22 | 199 |
HTML | 1 | 9 | 0 | 103 |
PHP code 50% from 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
The following items need your attention
- Method cyclomatic complexity has to be reduced to less than 100 (currently 189)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.44 |
Average class complexity | 125.83 |
▷ Minimum class complexity | 3.00 |
▷ Maximum class complexity | 635.00 |
Average method complexity | 6.26 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 189.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 | 144 | |
▷ Static methods | 31 | 21.53% |
▷ Public methods | 108 | 75.00% |
▷ Protected methods | 26 | 18.06% |
▷ Private methods | 10 | 6.94% |
Functions | 10 | |
▷ Named functions | 3 | 30.00% |
▷ Anonymous functions | 7 | 70.00% |
Constants | 55 | |
▷ Global constants | 55 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected