Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully
Server metrics [RAM: ▲0.91MB] [CPU: ▲6.48ms] Passed 4 tests
An overview of server-side resources used by Code Snippets
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.12 ▲0.65 | 45.65 ▲8.88 |
Dashboard /wp-admin | 4.28 ▲0.98 | 58.50 ▲13.31 |
Posts /wp-admin/edit.php | 4.40 ▲1.04 | 52.33 ▲5.78 |
Add New Post /wp-admin/post-new.php | 6.96 ▲1.07 | 100.67 ▲3.67 |
Media Library /wp-admin/upload.php | 4.21 ▲0.98 | 40.23 ▲7.57 |
Add New /wp-admin/admin.php?page=add-snippet | 4.39 | 43.15 |
Import /wp-admin/admin.php?page=import-code-snippets | 4.21 | 38.90 |
Settings /wp-admin/admin.php?page=snippets-settings | 4.24 | 39.93 |
All Snippets /wp-admin/admin.php?page=snippets | 4.67 | 50.98 |
Go Pro /wp-admin/admin.php?page=code_snippets_upgrade | 4.01 | 33.42 |
Server storage [IO: ▲1.13MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 321 new files
Database: 1 new table, 9 new options
New tables |
---|
wp_snippets |
New WordPress options |
---|
recently_activated_snippets |
theysaidso_admin_options |
widget_recent-comments |
code_snippets_version |
widget_recent-posts |
db_upgraded |
can_compress_scripts |
code_snippets_settings |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
A check of browser resources used by Code Snippets
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,843 ▲56 | 14.68 ▲0.61 | 1.77 ▼0.57 | 32.61 ▼12.47 |
Dashboard /wp-admin | 2,252 ▲78 | 5.62 ▼0.03 | 85.03 ▼9.50 | 37.12 ▼5.21 |
Posts /wp-admin/edit.php | 2,156 ▲59 | 1.96 ▼0.06 | 38.29 ▲2.54 | 34.52 ▼1.98 |
Add New Post /wp-admin/post-new.php | 1,572 ▲36 | 18.50 ▼4.54 | 608.35 ▼70.23 | 66.08 ▲6.65 |
Media Library /wp-admin/upload.php | 1,456 ▲59 | 4.17 ▼0.02 | 97.56 ▼3.14 | 42.71 ▼0.75 |
Add New /wp-admin/admin.php?page=add-snippet | 1,786 | 13.27 | 394.53 | 96.60 |
Import /wp-admin/admin.php?page=import-code-snippets | 994 | 2.02 | 23.28 | 32.14 |
Settings /wp-admin/admin.php?page=snippets-settings | 1,659 | 4.56 | 94.59 | 29.21 |
All Snippets /wp-admin/admin.php?page=snippets | 1,723 | 2.05 | 37.21 | 41.98 |
Go Pro /wp-admin/admin.php?page=code_snippets_upgrade | 6,754 | 17.71 | 364.81 | 192.51 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
- Zombie tables detected upon uninstall: 1 table
- wp_snippets
- This plugin does not fully uninstall, leaving 9 options in the database
- widget_theysaidso_widget
- code_snippets_settings
- widget_recent-posts
- widget_recent-comments
- code_snippets_version
- theysaidso_admin_options
- can_compress_scripts
- db_upgraded
- recently_activated_snippets
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 everything seems fine, this is not 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 take a closer look at the following
- 125× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/code-snippets/vendor/composer/installers/src/Composer/Installers/PantheonInstaller.php:5
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/code-snippets/vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php:4
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/code-snippets/vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php:7
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/code-snippets/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php:4
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/code-snippets/vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php:4
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/code-snippets/vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php:4
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/code-snippets/vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php:4
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/code-snippets/vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php:4
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/code-snippets/vendor/composer/installers/src/Composer/Installers/FuelInstaller.php:4
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/code-snippets/vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php:4
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
- License uri: Please fix this invalid url: "license.txt"
code-snippets/code-snippets.php Passed 13 tests
The main PHP script in "Code Snippets" version 3.6.2 is automatically included on every request by WordPress
122 characters long description:
An easy, clean and simple way to run code snippets on your site. No need to edit to your theme's functions.php file again!
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin12,580 lines of code in 313 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 156 | 2,052 | 3,837 | 8,339 |
TypeScript | 61 | 392 | 74 | 2,551 |
Sass | 14 | 267 | 0 | 1,235 |
JSON | 2 | 0 | 0 | 282 |
SVG | 2 | 0 | 0 | 97 |
CSS | 72 | 9 | 0 | 72 |
JavaScript | 6 | 0 | 5 | 4 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.39 |
Average class complexity | 7.23 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 163.00 |
Average method complexity | 2.99 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 36.00 |
Code structure | ||
---|---|---|
Namespaces | 8 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 132 | |
▷ Abstract classes | 3 | 2.27% |
▷ Concrete classes | 129 | 97.73% |
▷ Final classes | 1 | 0.78% |
Methods | 414 | |
▷ Static methods | 45 | 10.87% |
▷ Public methods | 282 | 68.12% |
▷ Protected methods | 81 | 19.57% |
▷ Private methods | 51 | 12.32% |
Functions | 67 | |
▷ Named functions | 47 | 70.15% |
▷ Anonymous functions | 20 | 29.85% |
Constants | 34 | |
▷ Global constants | 3 | 8.82% |
▷ Class constants | 31 | 91.18% |
▷ Public constants | 31 | 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
PNG images were not found in this plugin