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
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.00MB] [CPU: ▼7.82ms] Passed 4 tests
This is a short check of server-side resources used by Syntax-highlighting Code Block (with Server-side Rendering)
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 46.03 ▲4.87 |
Dashboard /wp-admin | 3.32 ▼0.03 | 48.09 ▼18.88 |
Posts /wp-admin/edit.php | 3.37 ▲0.01 | 48.77 ▼0.82 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.02 | 91.09 ▼14.65 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 37.97 ▲3.08 |
Server storage [IO: ▲1.63MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 316 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
db_upgraded |
widget_theysaidso_widget |
widget_recent-posts |
widget_recent-comments |
theysaidso_admin_options |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Syntax-highlighting Code Block (with Server-side Rendering)
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,814 ▲28 | 14.72 ▲0.37 | 1.79 ▼0.18 | 45.65 ▲0.53 |
Dashboard /wp-admin | 2,189 ▲12 | 5.56 ▼0.11 | 85.69 ▼9.22 | 38.82 ▼3.67 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 1.98 ▼0.01 | 39.77 ▲2.07 | 35.30 ▼2.34 |
Add New Post /wp-admin/post-new.php | 1,535 ▲9 | 23.13 ▲0.19 | 618.77 ▼73.13 | 53.83 ▼1.25 |
Media Library /wp-admin/upload.php | 1,397 ▼3 | 4.22 ▲0.04 | 96.92 ▼16.73 | 42.72 ▼4.73 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
- Zombie WordPress options were found after uninstall: 6 options
- widget_recent-comments
- can_compress_scripts
- theysaidso_admin_options
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 50% 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
- 3× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function Syntax_Highlighting_Code_Block\\add_action() in wp-content/plugins/syntax-highlighting-code-block/syntax-highlighting-code-block.php:254
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/syntax-highlighting-code-block/language-names.php:5
- > PHP Fatal error
Uncaught Error: Class 'Highlight\\Mode' not found in wp-content/plugins/syntax-highlighting-code-block/vendor/scrivo/highlight-php/Highlight/Language.php:48
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: code highlighting, code, syntax highlight, code syntax, block
syntax-highlighting-code-block/syntax-highlighting-code-block.php Passed 13 tests
The principal PHP file in "Syntax-highlighting Code Block (with Server-side Rendering)" v. 1.4.0 is loaded by WordPress automatically on each request
139 characters long description:
Extending the Code block with syntax highlighting rendered on the server, thus being AMP-compatible and having faster frontend performance.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin32,825 lines of code in 310 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JSON | 186 | 0 | 0 | 23,737 |
CSS | 93 | 1,261 | 698 | 5,947 |
PHP | 29 | 617 | 1,744 | 3,139 |
JavaScript | 2 | 0 | 0 | 2 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.45 |
Average class complexity | 20.60 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 113.00 |
Average method complexity | 3.66 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 23.00 |
Code structure | ||
---|---|---|
Namespaces | 5 | |
Interfaces | 0 | |
Traits | 1 | |
Classes | 14 | |
▷ Abstract classes | 3 | 21.43% |
▷ Concrete classes | 11 | 78.57% |
▷ Final classes | 2 | 18.18% |
Methods | 111 | |
▷ Static methods | 24 | 21.62% |
▷ Public methods | 75 | 67.57% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 36 | 32.43% |
Functions | 40 | |
▷ Named functions | 36 | 90.00% |
▷ Anonymous functions | 4 | 10.00% |
Constants | 13 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 13 | 100.00% |
▷ Public constants | 13 | 100.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 |
vendor/scrivo/highlight-php/styles/brown-papersq.png | 17.77KB | 9.92KB | ▼ 44.16% |
vendor/scrivo/highlight-php/styles/school-book.png | 0.47KB | 0.34KB | ▼ 27.37% |