Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.20MB] [CPU: ▼146.13ms] Passed 4 tests
This is a short check of server-side resources used by wp-syntax-highlighter
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.06 ▲0.22 | 33.48 ▼0.08 |
Dashboard /wp-admin | 3.26 ▲0.21 | 39.46 ▼10.06 |
Posts /wp-admin/edit.php | 3.31 ▲0.21 | 47.83 ▲0.22 |
Add New Post /wp-admin/post-new.php | 5.61 ▲0.18 | 81.87 ▼574.39 |
Media Library /wp-admin/upload.php | 3.21 ▲0.21 | 33.64 ▲0.01 |
WP Syntax Highlighter /wp-admin/options-general.php?page=wp-syntax-highlighter | 3.14 | 31.35 |
Server storage [IO: ▲1.91MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 380 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
wp-syntax-highlighter: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,687 ▲91 | 15.96 ▼0.07 | 10.53 ▼0.58 | 45.35 ▲0.52 |
Dashboard /wp-admin | 2,975 ▲41 | 5.95 ▲0.03 | 142.35 ▼4.87 | 110.05 ▼3.81 |
Posts /wp-admin/edit.php | 2,744 ▲5 | 2.71 ▼0.00 | 70.61 ▲2.68 | 92.57 ▲3.16 |
Add New Post /wp-admin/post-new.php | 1,501 ▼182 | 18.84 ▲0.36 | 415.60 ▲39.08 | 109.30 ▲2.21 |
Media Library /wp-admin/upload.php | 1,812 ▲2 | 5.01 ▼0.06 | 151.66 ▼0.68 | 111.34 ▼7.03 |
WP Syntax Highlighter /wp-admin/options-general.php?page=wp-syntax-highlighter | 1,303 | 3.90 | 91.40 | 85.11 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested
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 fix the following items
- 140× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Twig_Node_Expression_Binary' not found in wp-content/plugins/wp-syntax-highlighter/vendor/twig/twig/lib/Twig/Node/Expression/Binary/FloorDiv.php:11
- > PHP Fatal error
Uncaught Error: Class 'Twig_Node_Expression' not found in wp-content/plugins/wp-syntax-highlighter/vendor/twig/twig/lib/Twig/Node/Expression/BlockReference.php:18
- > PHP Fatal error
Uncaught Error: Interface 'Twig_FunctionInterface' not found in wp-content/plugins/wp-syntax-highlighter/vendor/twig/twig/lib/Twig/Function.php:20
- > PHP Fatal error
Uncaught Error: Class 'Arrow\\Sentry' not found in wp-content/plugins/wp-syntax-highlighter/vendor/dsawardekar/arrow/lib/Arrow/Ajax/Sentry.php:5
- > PHP Fatal error
Uncaught Error: Class 'Twig_Node_Expression_Unary' not found in wp-content/plugins/wp-syntax-highlighter/vendor/twig/twig/lib/Twig/Node/Expression/Unary/Neg.php:12
- > PHP Fatal error
Uncaught Error: Class 'Twig_Extension' not found in wp-content/plugins/wp-syntax-highlighter/vendor/twig/twig/lib/Twig/Extension/Optimizer.php:11
- > PHP Fatal error
Uncaught Error: Class 'Twig_Node' not found in wp-content/plugins/wp-syntax-highlighter/vendor/twig/twig/lib/Twig/Node/For.php:18
- > PHP Fatal error
Uncaught Error: Interface 'Twig_NodeVisitorInterface' not found in wp-content/plugins/wp-syntax-highlighter/vendor/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php:3
- > PHP Fatal error
Uncaught Error: Class 'Twig_Node_Expression_Binary' not found in wp-content/plugins/wp-syntax-highlighter/vendor/twig/twig/lib/Twig/Node/Expression/Binary/GreaterEqual.php:11
- > PHP Fatal error
Uncaught Error: Class 'Twig_TokenParser' not found in wp-content/plugins/wp-syntax-highlighter/vendor/twig/twig/lib/Twig/TokenParser/Use.php:26
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
- Screenshots: These screenshots require images: #1 (Screenshot 1), #2 (Screenshot 2)
wp-syntax-highlighter/wp-syntax-highlighter.php Passed 13 tests
The principal PHP file in "wp-syntax-highlighter" v. 0.5.1 is loaded by WordPress automatically on each request
47 characters long description:
WordPress Syntax Highlighter using Highlight.js
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 plugin35,767 lines of code in 369 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 92 | 3,055 | 8,223 | 19,282 |
PHP | 221 | 2,725 | 5,124 | 11,345 |
CSS | 54 | 682 | 386 | 4,882 |
JSON | 1 | 0 | 0 | 248 |
HTML | 1 | 1 | 0 | 10 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.38 |
Average class complexity | 6.79 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 116.00 |
Average method complexity | 2.12 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 43.00 |
Code structure | ||
---|---|---|
Namespaces | 9 | |
Interfaces | 20 | |
Traits | 0 | |
Classes | 197 | |
▷ Abstract classes | 10 | 5.08% |
▷ Concrete classes | 187 | 94.92% |
▷ Final classes | 0 | 0.00% |
Methods | 1,162 | |
▷ Static methods | 16 | 1.38% |
▷ Public methods | 1,052 | 90.53% |
▷ Protected methods | 108 | 9.29% |
▷ Private methods | 2 | 0.17% |
Functions | 52 | |
▷ Named functions | 51 | 98.08% |
▷ Anonymous functions | 1 | 1.92% |
Constants | 38 | |
▷ Global constants | 1 | 2.63% |
▷ Class constants | 37 | 97.37% |
▷ Public constants | 37 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up 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 |
css/school_book.png | 0.47KB | 0.34KB | ▼ 27.37% |
css/brown_papersq.png | 17.77KB | 9.92KB | ▼ 44.16% |