Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
- Install procedure had errors
- > Deprecated in wp-content/plugins/bwtf-waterquality/bwtf-waterquality.php+10
Methods with the same name as their class will not be constructors in a future version of PHP; WQWidget has a deprecated constructor
Server metrics [RAM: ▼1.92MB] [CPU: ▼49.96ms] Passed 4 tests
An overview of server-side resources used by BWTF Water Quality
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.06 ▼1.40 | 4.72 ▼35.32 |
Dashboard /wp-admin | 2.08 ▼1.22 | 5.89 ▼42.68 |
Posts /wp-admin/edit.php | 2.08 ▼1.27 | 6.28 ▼38.58 |
Add New Post /wp-admin/post-new.php | 2.08 ▼3.80 | 6.51 ▼83.25 |
Media Library /wp-admin/upload.php | 2.08 ▼1.15 | 5.24 ▼32.02 |
Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options |
---|
db_upgraded |
widget_recent-comments |
widget_wqwidget |
can_compress_scripts |
widget_recent-posts |
widget_theysaidso_widget |
theysaidso_admin_options |
Browser metrics Passed 4 tests
This is an overview of browser requirements for BWTF Water Quality
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲54 | 13.19 ▼1.11 | 4.59 ▲2.97 | 43.23 ▲6.78 |
Dashboard /wp-admin | 2,206 ▲17 | 4.85 ▼1.22 | 101.32 ▼32.38 | 38.74 ▼7.01 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 2.01 ▼0.03 | 38.84 ▲3.15 | 35.95 ▲2.85 |
Add New Post /wp-admin/post-new.php | 1,533 ▲14 | 22.95 ▲0.02 | 649.69 ▼10.73 | 50.06 ▼7.37 |
Media Library /wp-admin/upload.php | 1,388 ▼0 | 4.18 ▼0.06 | 93.36 ▼12.93 | 39.87 ▼9.19 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- Uninstall procedure had uncaught errors
- > Deprecated in wp-content/plugins/bwtf-waterquality/bwtf-waterquality.php+10
Methods with the same name as their class will not be constructors in a future version of PHP; WQWidget has a deprecated constructor
- This plugin did not uninstall successfully, leaving 7 options in the database
- db_upgraded
- can_compress_scripts
- widget_recent-posts
- widget_wqwidget
- widget_recent-comments
- widget_theysaidso_widget
- 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
Even though everything seems fine, this is not 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 fix the following items
- 2× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/bwtf-waterquality/wq2.php
- > /wp-content/plugins/bwtf-waterquality/wq.php
- 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bwtf-waterquality/bwtf-waterquality.php:10
- > PHP Notice
Undefined index: site in wp-content/plugins/bwtf-waterquality/wq2.php on line 28
- > PHP Notice
Undefined index: site in wp-content/plugins/bwtf-waterquality/wq.php on line 28
- > 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 Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: widget, water quality
bwtf-waterquality/bwtf-waterquality.php Passed 13 tests
The primary PHP file in "BWTF Water Quality" version 2.2 is used by WordPress to initiate all plugin functionality
112 characters long description:
Provides a Widget to display water quality test resuts from Surfrider Foundation's Blue Water Task Force program
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
Everything looks great! No dangerous files found in this plugin178 lines of code in 3 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 41 | 49 | 178 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 4.00 |
▷ Minimum class complexity | 4.00 |
▷ Maximum class complexity | 4.00 |
Average method complexity | 1.75 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 3.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 4 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 4 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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
No PNG images were found in this plugin