Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.04MB] [CPU: ▼7.55ms] Passed 4 tests
An overview of server-side resources used by SitePoint Random Hello Bar
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.50 ▲0.04 | 39.00 ▲2.06 |
Dashboard /wp-admin | 3.35 ▲0.01 | 47.45 ▼9.92 |
Posts /wp-admin/edit.php | 3.47 ▲0.11 | 43.34 ▼7.36 |
Add New Post /wp-admin/post-new.php | 5.93 ▲0.05 | 83.35 ▼11.62 |
Media Library /wp-admin/upload.php | 3.28 ▲0.05 | 34.15 ▼1.30 |
SP Random Hello Bar /wp-admin/options-general.php?page=sp-random-hello-bar | 3.24 | 32.42 |
Server storage [IO: ▲0.66MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
widget_recent-comments |
can_compress_scripts |
widget_recent-posts |
theysaidso_admin_options |
db_upgraded |
Browser metrics Passed 4 tests
This is an overview of browser requirements for SitePoint Random Hello Bar
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲58 | 13.33 ▼1.04 | 1.92 ▲0.20 | 42.77 ▲0.03 |
Dashboard /wp-admin | 2,207 ▲19 | 5.91 ▲0.05 | 99.99 ▼4.17 | 40.89 ▼0.80 |
Posts /wp-admin/edit.php | 2,093 ▲4 | 2.00 ▲0.00 | 32.98 ▼2.52 | 33.80 ▼3.74 |
Add New Post /wp-admin/post-new.php | 1,536 ▲1 | 23.13 ▼0.12 | 595.68 ▼91.16 | 49.38 ▼10.81 |
Media Library /wp-admin/upload.php | 1,395 ▲7 | 4.19 ▲0.00 | 96.58 ▼10.63 | 42.38 ▼6.36 |
SP Random Hello Bar /wp-admin/options-general.php?page=sp-random-hello-bar | 892 | 2.05 | 23.47 | 28.21 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
- Zombie WordPress options detected upon uninstall: 6 options
- can_compress_scripts
- widget_theysaidso_widget
- db_upgraded
- widget_recent-posts
- widget_recent-comments
- theysaidso_admin_options
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected
SRP 0% 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
Please fix the following
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/sp-random-hello-bar/src/views/admin/section_two_help.php
- 8× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/sp-random-hello-bar/src/views/admin/options_page.php:6
- > PHP Fatal error
Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/sp-random-hello-bar/src/views/admin/enabled-fields.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/sp-random-hello-bar/sp-random-hello-bar.php:11
- > PHP Fatal error
Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/sp-random-hello-bar/src/views/admin/load-css-fields.php:1
- > PHP Fatal error
Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/sp-random-hello-bar/src/views/admin/ad_fields.php:32
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/sp-random-hello-bar/src/views/admin/ad_fields.php on line 11
- > PHP Notice
Undefined variable: ads in wp-content/plugins/sp-random-hello-bar/src/views/admin/ad_fields.php on line 11
- > PHP Fatal error
Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/sp-random-hello-bar/src/views/admin/basic-js-fields.php:1
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
- Screenshots: Please add images for these screenshots: #1 (**Hello Bar in use** - An example hello bar being displayed on the Twenty Fifteen theme.), #2 (**SP Random Hello Bar Submenu**), #3 (**Settings** - Quickly enable the hello bar feature and chose what js/css to enqueue.), #4 (**Content** - Add as many hello bars as you wish.)
sp-random-hello-bar/sp-random-hello-bar.php Passed 13 tests
This is the main PHP file of "SitePoint Random Hello Bar" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
72 characters long description:
Displays a random hello bar after scrolling past an element of the page.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin573 lines of code in 24 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 12 | 59 | 19 | 241 |
PHP | 9 | 46 | 18 | 203 |
CSS | 2 | 17 | 0 | 94 |
JSON | 1 | 0 | 0 | 35 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.19 |
Average class complexity | 16.00 |
▷ Minimum class complexity | 16.00 |
▷ Maximum class complexity | 16.00 |
Average method complexity | 2.15 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 6.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 15 | |
▷ Static methods | 15 | 100.00% |
▷ Public methods | 12 | 80.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 3 | 20.00% |
Functions | 4 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 4 | 100.00% |
Constants | 1 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 1 | 100.00% |
▷ Public constants | 1 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.61MB with 0.42MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-2.png | 48.18KB | 13.44KB | ▼ 72.10% |
screenshot-1.png | 88.03KB | 24.45KB | ▼ 72.22% |
screenshot-3.png | 103.09KB | 34.30KB | ▼ 66.73% |
screenshot-4.png | 386.95KB | 129.84KB | ▼ 66.45% |