Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
- Install procedure had errors
- > Error in wp-content/plugins/wp-code-snippet/wp-code-snippet.php+27
Uncaught Error: Class 'Kamal\CodeSnippet\Blocks\Code_block' not found in wp-content/plugins/wp-code-snippet/wp-code-snippet.php:27
Stack trace:
#0 wp-content/plugins/wp-code-snippet/wp-code-snippet.php(45): Code_Snippet->__construct()
#1 wp-content/plugins/wp-code-snippet/wp-code-snippet.php(69): Code_Snippet::init()
#2 wp-content/plugins/wp-code-snippet/wp-code-snippet.php(72): codeSnippet_init()
#3 wp-admin/includes/plugin.php(2318): include_once('/var/www/wordpr...')
#4 wp-admin/includes/plugin.php(663): plugin_sandbox_scrape()
Server metrics [RAM: ▼0.01MB] [CPU: ▼6.79ms] Passed 4 tests
An overview of server-side resources used by WP Code Snippet
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 35.79 ▼1.00 |
Dashboard /wp-admin | 3.31 ▼0.04 | 44.33 ▼11.70 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 48.30 ▼1.68 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 90.23 ▼12.76 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 36.21 ▲1.59 |
Server storage [IO: ▲8.98MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 449 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
widget_theysaidso_widget |
db_upgraded |
widget_recent-posts |
can_compress_scripts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
WP Code Snippet: 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,825 ▲79 | 13.23 ▼1.16 | 1.89 ▲0.31 | 41.98 ▼1.06 |
Dashboard /wp-admin | 2,203 ▲12 | 4.85 ▼1.01 | 113.20 ▲10.04 | 39.03 ▼3.29 |
Posts /wp-admin/edit.php | 2,089 ▼3 | 2.05 ▲0.00 | 40.11 ▼1.96 | 33.77 ▼2.79 |
Add New Post /wp-admin/post-new.php | 1,542 ▲28 | 18.33 ▲0.73 | 587.33 ▼60.03 | 53.32 ▼6.35 |
Media Library /wp-admin/upload.php | 1,388 ▲3 | 4.27 ▲0.10 | 94.84 ▼20.06 | 41.34 ▼7.88 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-comments
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-posts
- db_upgraded
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test
SRP 0% 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
- 1× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/wp-code-snippet/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
- 112× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Carbon_Fields\\Service\\Service' not found in wp-content/plugins/wp-code-snippet/vendor/htmlburger/carbon-fields/core/Service/REST_API_Service.php:11
- > PHP Fatal error
Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Term_Condition' not found in wp-content/plugins/wp-code-snippet/vendor/htmlburger/carbon-fields/core/Container/Condition/Post_Term_Condition.php:30
- > PHP Fatal error
Uncaught Error: Class 'Carbon_Fields\\Container\\Fulfillable\\Translator\\Array_Translator' not found in wp-content/plugins/wp-code-snippet/vendor/htmlburger/carbon-fields/core/Container/Fulfillable/Translator/Json_Translator.php:7
- > PHP Fatal error
Uncaught Error: Class 'Carbon_Fields\\Container\\Container' not found in wp-content/plugins/wp-code-snippet/vendor/htmlburger/carbon-fields/core/Container/Widget_Container.php:10
- > PHP Fatal error
Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/wp-code-snippet/vendor/htmlburger/carbon-fields/core/Field/Html_Field.php:9
- > PHP Fatal error
Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/wp-code-snippet/vendor/htmlburger/carbon-fields/core/Field/File_Field.php:12
- > PHP Fatal error
Uncaught Error: Class 'Carbon_Fields\\Datastore\\Key_Value_Datastore' not found in wp-content/plugins/wp-code-snippet/vendor/htmlburger/carbon-fields/core/Datastore/Theme_Options_Datastore.php:10
- > PHP Fatal error
Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\User_Role_Condition' not found in wp-content/plugins/wp-code-snippet/vendor/htmlburger/carbon-fields/core/Container/Condition/Current_User_Role_Condition.php:10
- > PHP Fatal error
Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Comparer\\Comparer' not found in wp-content/plugins/wp-code-snippet/vendor/htmlburger/carbon-fields/core/Container/Condition/Comparer/Any_Contain_Comparer.php:7
- > PHP Fatal error
Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Term_Condition' not found in wp-content/plugins/wp-code-snippet/vendor/htmlburger/carbon-fields/core/Container/Condition/Term_Ancestor_Condition.php:28
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
- Screenshots: Please add images for these screenshots: #1 (Classic editor shortcode), #2 (Gutenburg block), #3 (Frontend Preview)
wp-code-snippet/wp-code-snippet.php 85% from 13 tests
"WP Code Snippet" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
- Domain Path: The domain path folder was not found ("/languages/")
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected27,361 lines of code in 402 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 172 | 5,178 | 8,445 | 12,918 |
PHP | 146 | 2,461 | 6,503 | 8,681 |
CSS | 8 | 366 | 1,164 | 1,902 |
Sass | 48 | 334 | 0 | 1,746 |
PO File | 20 | 610 | 779 | 1,652 |
JSON | 4 | 0 | 0 | 368 |
Markdown | 4 | 35 | 0 | 94 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.27 |
Average class complexity | 8.06 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 50.00 |
Average method complexity | 2.03 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 24 | |
Interfaces | 5 | |
Traits | 0 | |
Classes | 124 | |
▷ Abstract classes | 11 | 8.87% |
▷ Concrete classes | 113 | 91.13% |
▷ Final classes | 1 | 0.88% |
Methods | 899 | |
▷ Static methods | 91 | 10.12% |
▷ Public methods | 730 | 81.20% |
▷ Protected methods | 165 | 18.35% |
▷ Private methods | 4 | 0.44% |
Functions | 103 | |
▷ Named functions | 22 | 21.36% |
▷ Anonymous functions | 81 | 78.64% |
Constants | 33 | |
▷ Global constants | 10 | 30.30% |
▷ Class constants | 23 | 69.70% |
▷ Public constants | 23 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.54MB with 0.44MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-2.png | 134.68KB | 21.46KB | ▼ 84.07% |
screenshot-3.png | 260.51KB | 50.71KB | ▼ 80.53% |
screenshot-1.png | 152.91KB | 26.25KB | ▼ 82.84% |