Benchmarks
Plugin footprint 47% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully
Server metrics [RAM: ▲5.53MB] [CPU: ▲23.80ms] 75% from 4 tests
Server-side resources used by Post Snippets - Custom WordPress Code Snippets Customizer
Please have a look at the following items
- Extra RAM: The extra memory usage should kept under 5MB (currently 5.53MB on /wp-admin/admin.php?page=freemius)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 9.23 ▲5.77 | 64.53 ▲27.29 |
Dashboard /wp-admin | 9.25 ▲5.91 | 77.76 ▲19.92 |
Posts /wp-admin/edit.php | 9.25 ▲5.90 | 75.24 ▲26.85 |
Add New Post /wp-admin/post-new.php | 10.43 ▲4.54 | 115.98 ▲21.12 |
Media Library /wp-admin/upload.php | 9.25 ▲6.02 | 77.48 ▲41.98 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 9.25 | 63.22 |
Server storage [IO: ▲8.99MB] [DB: ▲0.01MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 387 new files
Database: 2 new tables, 11 new options
New tables |
---|
wp_pspro_snippets |
wp_pspro_groups |
New WordPress options |
---|
post_snippets_version |
fs_accounts |
widget_recent-posts |
widget_theysaidso_widget |
theysaidso_admin_options |
fs_active_plugins |
db_upgraded |
fs_debug_mode |
widget_recent-comments |
can_compress_scripts |
... |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Post Snippets - Custom WordPress Code Snippets Customizer
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,997 ▲236 | 13.78 ▼0.50 | 1.76 ▲0.17 | 30.50 ▼11.05 |
Dashboard /wp-admin | 2,391 ▲217 | 5.49 ▼0.09 | 105.86 ▲19.02 | 79.31 ▲37.69 |
Posts /wp-admin/edit.php | 2,316 ▲216 | 2.88 ▲0.90 | 52.54 ▲15.15 | 38.29 ▲4.56 |
Add New Post /wp-admin/post-new.php | 1,916 ▲388 | 25.86 ▲2.59 | 735.40 ▲50.77 | 41.89 ▼9.60 |
Media Library /wp-admin/upload.php | 1,596 ▲193 | 5.14 ▲0.97 | 109.30 ▲12.18 | 96.16 ▲50.66 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 1,254 | 2.53 | 50.31 | 30.87 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 25% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
- This plugin cannot be uninstalled
- > Notice in wp-content/plugins/post-snippets/freemius/includes/class-freemius.php+8486
Undefined property: stdClass::$plugins
- Zombie tables were found after uninstall: 2 tables
- wp_pspro_groups
- wp_pspro_snippets
- The uninstall procedure has failed, leaving 11 options in the database
- can_compress_scripts
- fs_accounts
- widget_recent-comments
- fs_active_plugins
- theysaidso_admin_options
- post_snippets_version
- widget_theysaidso_widget
- psp_db_version
- fs_debug_mode
- db_upgraded
- ...
Smoke tests 50% 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)
Even though no errors were found, this is by no means an exhaustive test
SRP 0% 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
- 2× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/post-snippets/views/admin_news.php
- > /wp-content/plugins/post-snippets/views/jquery_ui_dialog_head.php
- 20× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/post-snippets/views/jquery_ui_dialog_footer.php:11
- > PHP Notice
Undefined variable: snippets in wp-content/plugins/post-snippets/views/jquery_ui_dialog_head.php on line 61
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/post-snippets/views/help/php.php:4
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/post-snippets/views/admin_news.php on line 32
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/post-snippets/views/jquery_ui_dialog_head.php on line 12
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/post-snippets/views/jquery_ui_dialog_head.php on line 61
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/post-snippets/views/help/restapi.php:1
- > PHP Notice
Undefined variable: snippetStack in wp-content/plugins/post-snippets/views/jquery_ui_dialog_head.php on line 5
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/post-snippets/views/help/advanced.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/post-snippets/views/help/post.php:1
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 88% from 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
- Screenshots: Add descriptions for screenshots #10, #11, #6, #7, #8, #9 in post-snippets/assets to your readme.txt
- Requires php: Version not formatted correctly
post-snippets/post-snippets.php Passed 13 tests
The main PHP script in "Post Snippets - Custom WordPress Code Snippets Customizer" version 4.0.4 is automatically included on every request by WordPress
132 characters long description:
Create a library of reusable content and insert it into your posts and pages. Navigate to "Settings > Post Snippets" to get started.
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin112,840 lines of code in 291 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 58 | 495 | 719 | 52,230 |
PHP | 147 | 9,566 | 18,199 | 37,783 |
PO File | 26 | 7,501 | 9,126 | 17,048 |
CSS | 23 | 90 | 80 | 2,891 |
Sass | 31 | 402 | 78 | 2,553 |
Markdown | 1 | 68 | 0 | 214 |
SVG | 3 | 1 | 1 | 80 |
JSON | 1 | 0 | 0 | 27 |
XML | 1 | 0 | 0 | 14 |
PHP code 50% from 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
These items need your attention
- Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.60 |
Average class complexity | 84.31 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3,073.00 |
Average method complexity | 4.55 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 94.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 59 | |
▷ Abstract classes | 2 | 3.39% |
▷ Concrete classes | 57 | 96.61% |
▷ Final classes | 0 | 0.00% |
Methods | 1,416 | |
▷ Static methods | 252 | 17.80% |
▷ Public methods | 1,005 | 70.97% |
▷ Protected methods | 19 | 1.34% |
▷ Private methods | 392 | 27.68% |
Functions | 110 | |
▷ Named functions | 107 | 97.27% |
▷ Anonymous functions | 3 | 2.73% |
Constants | 168 | |
▷ Global constants | 106 | 63.10% |
▷ Class constants | 62 | 36.90% |
▷ Public constants | 62 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
24 PNG files occupy 1.06MB with 0.64MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
repo/screenshot-2.png | 135.57KB | 37.84KB | ▼ 72.08% |
repo/banner-1544x500.png | 50.13KB | 20.81KB | ▼ 58.48% |
repo/screenshot-1.png | 181.14KB | 51.24KB | ▼ 71.71% |
assets/img/ProductDisclaimer.png | 6.96KB | 4.08KB | ▼ 41.34% |
assets/img/help/create-snippet-success.png | 8.02KB | 3.42KB | ▼ 57.31% |