Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.14MB] [CPU: ▲6.75ms] Passed 4 tests
A check of server-side resources used by Code Snippets CPT
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.57 ▲0.11 | 41.19 ▲4.45 |
Dashboard /wp-admin | 3.72 ▲0.41 | 56.74 ▲11.99 |
Posts /wp-admin/edit.php | 3.46 ▲0.10 | 48.72 ▲3.79 |
Add New Post /wp-admin/post-new.php | 6.14 ▲0.25 | 95.39 ▲13.30 |
Media Library /wp-admin/upload.php | 3.33 ▲0.10 | 41.99 ▲6.76 |
Settings /wp-admin/edit.php?post_type=code-snippets&page=code-snippets-cpt | 3.32 | 32.45 |
All Code Snippets /wp-admin/edit.php?post_type=code-snippets | 3.36 | 37.93 |
Snippet Tags /wp-admin/edit-tags.php?taxonomy=snippet-tags&post_type=code-snippets | 3.32 | 35.54 |
Add New Code Snippet /wp-admin/post-new.php?post_type=code-snippets | 3.67 | 49.72 |
Snippet Categories /wp-admin/edit-tags.php?taxonomy=snippet-categories&post_type=code-snippets | 3.32 | 35.64 |
Server storage [IO: ▲18.26MB] [DB: ▲0.01MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 718 new files
Database: no new tables, 8 new options
New WordPress options |
---|
theysaidso_admin_options |
can_compress_scripts |
widget_recent-posts |
widget_recent-comments |
languages_children |
widget_theysaidso_widget |
db_upgraded |
dsgnwrks_snippet_version |
Browser metrics Passed 4 tests
An overview of browser requirements for Code Snippets CPT
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,873 ▲1,102 | 15.73 ▲1.35 | 2.58 ▲0.84 | 43.08 ▲0.24 |
Dashboard /wp-admin | 3,261 ▲1,073 | 6.16 ▲0.26 | 131.69 ▲30.94 | 89.74 ▲48.19 |
Posts /wp-admin/edit.php | 2,128 ▲39 | 2.03 ▲0.03 | 36.90 ▲1.29 | 36.09 ▲1.28 |
Add New Post /wp-admin/post-new.php | 2,667 ▲1,139 | 19.12 ▲1.19 | 700.44 ▲104.02 | 40.14 ▼9.39 |
Media Library /wp-admin/upload.php | 1,427 ▲36 | 4.15 ▼0.06 | 92.88 ▼6.99 | 39.95 ▼3.41 |
Settings /wp-admin/edit.php?post_type=code-snippets&page=code-snippets-cpt | 852 | 2.03 | 26.82 | 25.96 |
All Code Snippets /wp-admin/edit.php?post_type=code-snippets | 1,133 | 1.93 | 28.77 | 29.75 |
Snippet Tags /wp-admin/edit-tags.php?taxonomy=snippet-tags&post_type=code-snippets | 1,270 | 2.13 | 26.58 | 27.01 |
Add New Code Snippet /wp-admin/post-new.php?post_type=code-snippets | 2,560 | 3.95 | 78.92 | 67.93 |
Snippet Categories /wp-admin/edit-tags.php?taxonomy=snippet-categories&post_type=code-snippets | 1,298 | 2.14 | 27.35 | 25.73 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
- This plugin did not uninstall successfully, leaving 8 options in the database
- db_upgraded
- widget_recent-comments
- dsgnwrks_snippet_version
- can_compress_scripts
- widget_theysaidso_widget
- languages_children
- theysaidso_admin_options
- widget_recent-posts
Smoke tests 75% 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 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 items
- 4× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/code-snippets-cpt/dsgnwrks-code-snippets-cpt.php:39
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/code-snippets-cpt/lib/views/settings-page.php:2
- > PHP Fatal error
Uncaught Error: Class 'CodeSnippitInit' not found in wp-content/plugins/code-snippets-cpt/lib/views/snippet-window.php:43
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/code-snippets-cpt/lib/views/shortcode-button-form.php:70
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
No tags were found
code-snippets-cpt/dsgnwrks-code-snippets-cpt.php 92% from 13 tests
The primary PHP file in "Code Snippets CPT" version 2.1.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("code-snippets-cpt.php" instead of "dsgnwrks-code-snippets-cpt.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin245,674 lines of code in 707 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 687 | 26,181 | 16,803 | 243,316 |
PHP | 10 | 276 | 170 | 1,466 |
CSS | 6 | 113 | 59 | 501 |
Sass | 4 | 53 | 3 | 391 |
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.37 |
Average class complexity | 27.50 |
▷ Minimum class complexity | 5.00 |
▷ Maximum class complexity | 45.00 |
Average method complexity | 3.37 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 11.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 6 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 6 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 67 | |
▷ Static methods | 7 | 10.45% |
▷ Public methods | 66 | 98.51% |
▷ Protected methods | 1 | 1.49% |
▷ Private methods | 0 | 0.00% |
Functions | 2 | |
▷ Named functions | 2 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 2 | 50.00% |
▷ Class constants | 2 | 50.00% |
▷ Public constants | 2 | 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
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/css/code-snippets32.png | 2.11KB | 1.25KB | ▼ 40.53% |
assets/js/icon.png | 1.50KB | 0.71KB | ▼ 52.99% |
assets/css/code-snippets.png | 1.59KB | 1.04KB | ▼ 34.36% |