Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲0.28MB] [CPU: ▼2.79ms] Passed 4 tests
A check of server-side resources used by codeSnips
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.72 ▲0.26 | 52.44 ▲11.69 |
Dashboard /wp-admin | 3.58 ▲0.28 | 54.28 ▲1.68 |
Posts /wp-admin/edit.php | 3.70 ▲0.34 | 54.14 ▼4.22 |
Add New Post /wp-admin/post-new.php | 6.19 ▲0.30 | 89.50 ▼10.66 |
Media Library /wp-admin/upload.php | 3.50 ▲0.28 | 38.51 ▲2.03 |
Settings /wp-admin/edit.php?post_type=snippets&page=cs_settings | 3.47 | 34.81 |
Add New /wp-admin/post-new.php?post_type=snippets | 3.64 | 57.54 |
All Snippets /wp-admin/edit.php?post_type=snippets | 3.55 | 38.12 |
Server storage [IO: ▲0.09MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 15 new options
New WordPress options |
---|
cs_global_show_metabar |
cs_global_show_php_inline |
widget_recent-comments |
cs_admin_theme |
theysaidso_admin_options |
widget_theysaidso_widget |
cs_version |
db_upgraded |
cs_rewrite_slug |
cs_frontend_theme |
... |
Browser metrics Passed 4 tests
This is an overview of browser requirements for codeSnips
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,875 ▲114 | 15.38 ▲0.63 | 6.46 ▲4.77 | 42.08 ▲0.24 |
Dashboard /wp-admin | 2,257 ▲51 | 6.02 ▲0.90 | 114.56 ▲10.55 | 40.81 ▼0.07 |
Posts /wp-admin/edit.php | 2,150 ▲50 | 2.89 ▲0.83 | 43.71 ▲2.15 | 39.55 ▲0.92 |
Add New Post /wp-admin/post-new.php | 1,568 ▲37 | 23.65 ▲0.20 | 674.35 ▲13.20 | 52.51 ▼4.78 |
Media Library /wp-admin/upload.php | 1,444 ▲44 | 5.34 ▲1.19 | 103.04 ▼7.46 | 41.24 ▼7.75 |
Settings /wp-admin/edit.php?post_type=snippets&page=cs_settings | 943 | 2.42 | 32.59 | 31.85 |
Add New /wp-admin/post-new.php?post_type=snippets | 3,215 | 10.10 | 224.14 | 86.72 |
All Snippets /wp-admin/edit.php?post_type=snippets | 1,207 | 2.84 | 38.23 | 31.61 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
- Zombie WordPress options were found after uninstall: 8 options
- widget_recent-posts
- widget_recent-comments
- db_upgraded
- cs_global_show_php_inline
- can_compress_scripts
- widget_theysaidso_widget
- cs_version
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
- 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_header() in wp-content/plugins/codesnips/template-samples/archive-snippets.php:9
- > PHP Fatal error
Uncaught Error: Call to undefined function get_header() in wp-content/plugins/codesnips/template-samples/single-snippets.php:9
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/codesnips/includes/class-codesnips.php:14
- > 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 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
These attributes need your attention:
- Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
codesnips/codesnips.php Passed 13 tests
The main PHP script in "codeSnips" version 1.2 is automatically included on every request by WordPress
140 characters long description:
Create individual code snippet posts and then display them as an individual page, show the entire archive list or embed them into your post.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin1,168 lines of code in 10 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 7 | 219 | 139 | 1,040 |
CSS | 3 | 7 | 1 | 128 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.24 |
Average class complexity | 37.00 |
▷ Minimum class complexity | 12.00 |
▷ Maximum class complexity | 62.00 |
Average method complexity | 2.55 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 24.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 45 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 44 | 97.78% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 2.22% |
Functions | 1 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 1 | 100.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
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/OBrienLabs-Logo-h75px.png | 12.21KB | 4.67KB | ▼ 61.79% |