Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
- The plugin cannot be installed
- > Notice in wp-content/plugins/widgets-on-pages/includes/class-widgets-on-pages-activator.php+44
Trying to access array offset on value of type bool
Server metrics [RAM: ▲5.39MB] [CPU: ▲27.33ms] 75% from 4 tests
A check of server-side resources used by Widgets on Pages
It is recommended to improve the following
- Extra RAM: Try to keep extra memory usage under 5MB (currently 5.39MB on /wp-admin/admin.php?page=freemius)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 9.22 ▲5.75 | 66.93 ▲25.48 |
Dashboard /wp-admin | 9.24 ▲5.89 | 78.55 ▲14.03 |
Posts /wp-admin/edit.php | 9.24 ▲5.88 | 83.88 ▲36.80 |
Add New Post /wp-admin/post-new.php | 9.94 ▲4.05 | 133.20 ▲39.21 |
Media Library /wp-admin/upload.php | 9.24 ▲6.01 | 67.72 ▲33.02 |
Turbo Sidebars /wp-admin/edit.php?post_type=turbo-sidebar-cpt | 9.24 | 66.23 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 9.24 | 61.95 |
Server storage [IO: ▲3.28MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 204 new files
Database: no new tables, 10 new options
New WordPress options |
---|
fs_accounts |
theysaidso_admin_options |
fs_active_plugins |
wop_plugin_version |
fs_debug_mode |
widget_theysaidso_widget |
widget_recent-posts |
db_upgraded |
widget_recent-comments |
can_compress_scripts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Widgets on Pages
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,840 ▲94 | 13.60 ▼1.08 | 1.82 ▲0.01 | 29.88 ▼13.89 |
Dashboard /wp-admin | 2,243 ▲61 | 5.00 ▼0.86 | 120.24 ▲14.59 | 44.71 ▲3.07 |
Posts /wp-admin/edit.php | 2,129 ▲40 | 2.18 ▲0.17 | 45.00 ▲9.39 | 38.40 ▲2.85 |
Add New Post /wp-admin/post-new.php | 1,537 ▲4 | 22.78 ▼0.20 | 703.00 ▲90.05 | 67.99 ▲20.19 |
Media Library /wp-admin/upload.php | 1,422 ▲37 | 4.26 ▲0.00 | 106.29 ▼5.54 | 45.37 ▼0.13 |
Turbo Sidebars /wp-admin/edit.php?post_type=turbo-sidebar-cpt | 1,622 | 2.06 | 44.25 | 34.40 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 1,083 | 1.85 | 23.73 | 27.64 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
- Uninstall procedure had uncaught errors
- > Notice in wp-content/plugins/widgets-on-pages/freemius/includes/class-freemius.php+8486
Undefined property: stdClass::$plugins
- This plugin does not fully uninstall, leaving 9 options in the database
- fs_accounts
- fs_active_plugins
- db_upgraded
- can_compress_scripts
- fs_debug_mode
- theysaidso_admin_options
- widget_recent-comments
- widget_theysaidso_widget
- widget_recent-posts
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
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
The following issues need your attention
- 2× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/widgets-on-pages/admin/partials/widgets-on-pages-admin-display.php:18
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/widgets-on-pages/includes/class-functions.php:85
- > 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 88% from 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
- Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
- Screenshots: Please add images for these screenshots: #1 (Setting up the sidebars.), #2 (Widgets on Pages 'Turbo Sidebars' page.)
widgets-on-pages/widgets_on_pages.php 92% from 13 tests
The main PHP script in "Widgets on Pages" version 1.8.1 is automatically included on every request by WordPress
The following require your attention:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("widgets-on-pages.php" instead of "widgets_on_pages.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin35,038 lines of code in 154 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 130 | 8,142 | 17,993 | 34,379 |
JavaScript | 6 | 45 | 62 | 376 |
Markdown | 1 | 68 | 0 | 214 |
CSS | 16 | 6 | 4 | 42 |
JSON | 1 | 0 | 0 | 27 |
PHP code 50% from 2 tests
This is a very shot review of cyclomatic complexity and code structure
These items need your attention
- Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.62 |
Average class complexity | 82.24 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3,073.00 |
Average method complexity | 4.50 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 94.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 55 | |
▷ Abstract classes | 2 | 3.64% |
▷ Concrete classes | 53 | 96.36% |
▷ Final classes | 0 | 0.00% |
Methods | 1,305 | |
▷ Static methods | 203 | 15.56% |
▷ Public methods | 911 | 69.81% |
▷ Protected methods | 17 | 1.30% |
▷ Private methods | 377 | 28.89% |
Functions | 106 | |
▷ Named functions | 106 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 146 | |
▷ Global constants | 99 | 67.81% |
▷ Class constants | 47 | 32.19% |
▷ Public constants | 47 | 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
4 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-2.png | 65.08KB | 24.61KB | ▼ 62.18% |
screenshot-1.png | 14.76KB | 7.80KB | ▼ 47.11% |
freemius/assets/img/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |
freemius/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |