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
Installer ran successfully
Server metrics [RAM: ▲0.57MB] [CPU: ▲4.37ms] Passed 4 tests
Analyzing server-side resources used by Plugin Sponsor Banner
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.00 ▲0.54 | 46.90 ▲6.03 |
Dashboard /wp-admin | 3.89 ▲0.59 | 56.01 ▲6.25 |
Posts /wp-admin/edit.php | 3.92 ▲0.56 | 53.46 ▲2.95 |
Add New Post /wp-admin/post-new.php | 6.49 ▲0.60 | 109.39 ▲2.24 |
Media Library /wp-admin/upload.php | 3.82 ▲0.59 | 42.19 ▲10.14 |
Add new item /wp-admin/post-new.php?post_type=sponsor | 4.10 | 46.78 |
All Sponsor /wp-admin/edit.php?post_type=sponsor | 3.86 | 39.92 |
Categories /wp-admin/edit-tags.php?taxonomy=categoriesponsor&post_type=sponsor | 3.81 | 35.00 |
Server storage [IO: ▲2.55MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 371 new files
Database: no new tables, 8 new options
New WordPress options |
---|
widget_recent-comments |
widget_recent-posts |
can_compress_scripts |
recovery_mode_email_last_sent |
db_upgraded |
theysaidso_admin_options |
widget_sponsor_widget |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
Plugin Sponsor Banner: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,932 ▲197 | 14.08 ▼0.24 | 4.74 ▲3.09 | 39.23 ▼7.57 |
Dashboard /wp-admin | 2,252 ▲64 | 4.96 ▲0.02 | 110.14 ▼6.86 | 40.43 ▼8.03 |
Posts /wp-admin/edit.php | 2,138 ▲49 | 2.08 ▲0.04 | 40.95 ▼2.71 | 36.99 ▲0.21 |
Add New Post /wp-admin/post-new.php | 1,551 ▲18 | 23.23 ▲0.06 | 657.19 ▲64.42 | 54.17 ▲8.99 |
Media Library /wp-admin/upload.php | 1,434 ▲52 | 4.29 ▼0.01 | 114.17 ▲19.12 | 47.45 ▲5.33 |
Add new item /wp-admin/post-new.php?post_type=sponsor | 1,387 | 1.53 | 6.93 | 26.80 |
All Sponsor /wp-admin/edit.php?post_type=sponsor | 1,113 | 2.00 | 35.11 | 28.17 |
Categories /wp-admin/edit-tags.php?taxonomy=categoriesponsor&post_type=sponsor | 1,307 | 2.23 | 26.54 | 23.86 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 did not uninstall successfully, leaving 8 options in the database
- widget_recent-posts
- db_upgraded
- theysaidso_admin_options
- widget_recent-comments
- widget_theysaidso_widget
- recovery_mode_email_last_sent
- can_compress_scripts
- widget_sponsor_widget
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
- > GET request to /wp-admin/post-new.php?post_type=sponsor
- > Compile error in wp-content/plugins/sponsor-banners/includes/cmb2/includes/types/CMB2_Type_File.php+15
Declaration of CMB2_Type_File::render() must be compatible with CMB2_Type_Text::render($args = Array)
SRP 0% 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
- 3× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/sponsor-banners/admin/partials/sponsor-admin-display.php
- > /wp-content/plugins/sponsor-banners/includes/class-sponsor-widget.php
- > /wp-content/plugins/sponsor-banners/public/partials/sponsor-public-display.php
- 33× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/sponsor-banners/includes/cmb2/includes/types/CMB2_Type_Text_Datetime_Timestamp.php:13
- > PHP Fatal error
Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/sponsor-banners/includes/cmb2/includes/types/CMB2_Type_Title.php:13
- > PHP Fatal error
Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/sponsor-banners/includes/cmb2/includes/CMB2.php:17
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sponsor-banners/includes/cmb2/example-functions.php:105
- > PHP Fatal error
Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/sponsor-banners/includes/cmb2/includes/types/CMB2_Type_Checkbox.php:13
- > PHP Fatal error
Uncaught Error: Class 'CMB2_Type_Text_Date' not found in wp-content/plugins/sponsor-banners/includes/cmb2/includes/types/CMB2_Type_Text_Time.php:13
- > PHP Fatal error
Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/sponsor-banners/includes/cmb2/includes/types/CMB2_Type_File.php:13
- > PHP Fatal error
Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/sponsor-banners/includes/cmb2/includes/types/CMB2_Type_Text.php:13
- > PHP Fatal error
Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/sponsor-banners/includes/cmb2/includes/CMB2_Field.php:17
- > PHP Fatal error
Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/sponsor-banners/includes/cmb2/includes/types/CMB2_Type_File_List.php:13
- > 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)
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
- Screenshots: Please add descriptions for these screenshots #2, #3 in sponsor-banners/assets to your readme.txt
sponsor-banners/sponsor.php 85% from 13 tests
The main PHP script in "Plugin Sponsor Banner" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
- Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
- Main file name: It is recommended to name the main PHP file as the plugin slug ("sponsor-banners.php" instead of "sponsor.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected43,379 lines of code in 217 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PO File | 121 | 13,774 | 17,856 | 31,513 |
PHP | 59 | 1,520 | 3,963 | 5,040 |
CSS | 14 | 1,002 | 1,042 | 4,406 |
Sass | 13 | 238 | 25 | 1,149 |
JavaScript | 6 | 225 | 296 | 842 |
Markdown | 4 | 156 | 0 | 429 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.46 |
Average class complexity | 13.14 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 144.00 |
Average method complexity | 3.30 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 26.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 66 | |
▷ Abstract classes | 6 | 9.09% |
▷ Concrete classes | 60 | 90.91% |
▷ Final classes | 0 | 0.00% |
Methods | 350 | |
▷ Static methods | 46 | 13.14% |
▷ Public methods | 299 | 85.43% |
▷ Protected methods | 43 | 12.29% |
▷ Private methods | 8 | 2.29% |
Functions | 37 | |
▷ Named functions | 36 | 97.30% |
▷ Anonymous functions | 1 | 2.70% |
Constants | 5 | |
▷ Global constants | 3 | 60.00% |
▷ Class constants | 2 | 40.00% |
▷ Public constants | 2 | 100.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
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
includes/cmb2/images/ui-bg_glass_75_dadada_1x400.png | 0.11KB | 0.16KB | 0.00% |
includes/cmb2/images/ui-icons_cd0a0a_256x240.png | 4.27KB | 4.11KB | ▼ 3.78% |
includes/cmb2/images/ui-icons_454545_256x240.png | 4.27KB | 4.11KB | ▼ 3.78% |
includes/cmb2/images/ui-bg_highlight-soft_75_cccccc_1x100.png | 0.10KB | 0.17KB | 0.00% |
includes/cmb2/images/ico-delete.png | 0.70KB | 0.72KB | 0.00% |