Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
- The plugin cannot be installed
- > Deprecated in wp-content/plugins/syntax-highlighting/plugin/widget.php+179
Function create_function() is deprecated
Server metrics [RAM: ▼1.90MB] [CPU: ▼48.83ms] Passed 4 tests
A check of server-side resources used by Syntax Highlighting
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.06 ▼1.40 | 5.25 ▼33.07 |
Dashboard /wp-admin | 2.11 ▼1.19 | 7.45 ▼36.66 |
Posts /wp-admin/edit.php | 2.11 ▼1.25 | 7.77 ▼41.28 |
Add New Post /wp-admin/post-new.php | 2.11 ▼3.78 | 7.46 ▼84.32 |
Media Library /wp-admin/upload.php | 2.11 ▼1.12 | 7.77 ▼25.76 |
Server storage [IO: ▲0.29MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 93 new files
Database: no new tables, 11 new options
New WordPress options |
---|
slwsu_syntax_highlighting_delete_options |
widget_recent-posts |
widget_recent-comments |
can_compress_scripts |
widget_theysaidso_widget |
slwsu_syntax_highlighting_post_types |
slwsu_syntax_highlighting_grouper |
slwsu_syntax_highlighting_default_color |
widget_syntax_highlighting |
theysaidso_admin_options |
... |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Syntax Highlighting
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,816 ▲55 | 14.74 ▲0.39 | 3.86 ▲2.26 | 43.39 ▼1.68 |
Dashboard /wp-admin | 2,212 ▲35 | 5.56 ▼0.10 | 82.50 ▼5.88 | 40.07 ▲1.96 |
Posts /wp-admin/edit.php | 2,120 ▲20 | 2.04 ▲0.01 | 33.83 ▼6.12 | 32.33 ▼6.16 |
Add New Post /wp-admin/post-new.php | 6,260 ▲4,734 | 20.93 ▼2.56 | 843.08 ▲195.20 | 71.04 ▲15.12 |
Media Library /wp-admin/upload.php | 1,423 ▲20 | 4.24 ▼0.05 | 95.71 ▲0.29 | 40.84 ▼2.97 |
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
- > Deprecated in wp-content/plugins/syntax-highlighting/plugin/widget.php+179
Function create_function() is deprecated
- This plugin does not fully uninstall, leaving 7 options in the database
- db_upgraded
- can_compress_scripts
- widget_recent-posts
- widget_recent-comments
- widget_theysaidso_widget
- widget_syntax_highlighting
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 50% 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 trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/syntax-highlighting/plugin/widget.php:6
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side
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
8 plugin tags: highlight js, syntax highlighting, highlighting, code highlight, highlighter...
syntax-highlighting/syntax-highlighting.php 92% from 13 tests
This is the main PHP file of "Syntax Highlighting" version 0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
- Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin8,180 lines of code in 85 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 65 | 844 | 491 | 5,960 |
Markdown | 3 | 374 | 0 | 956 |
PHP | 13 | 145 | 283 | 747 |
JavaScript | 3 | 85 | 113 | 402 |
PO File | 1 | 43 | 44 | 115 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.34 |
Average class complexity | 9.25 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 68.00 |
Average method complexity | 2.43 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 63.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 12 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 12 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 69 | |
▷ Static methods | 12 | 17.39% |
▷ Public methods | 60 | 86.96% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 9 | 13.04% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
plugin/front/assets/hightlight/styles/school_book.png | 0.47KB | 0.34KB | ▼ 27.37% |
plugin/front/assets/hightlight/styles/brown_papersq.png | 17.77KB | 9.92KB | ▼ 44.16% |