Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully
Server metrics [RAM: ▲0.02MB] [CPU: ▼11.96ms] Passed 4 tests
This is a short check of server-side resources used by South African Covid-19 Banner
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.42 ▼0.04 | 25.84 ▼20.67 |
Dashboard /wp-admin | 3.35 ▲0.05 | 49.13 ▼3.16 |
Posts /wp-admin/edit.php | 3.40 ▲0.05 | 49.15 ▼5.83 |
Add New Post /wp-admin/post-new.php | 5.93 ▲0.05 | 84.18 ▼18.19 |
Media Library /wp-admin/upload.php | 3.27 ▲0.05 | 36.35 ▲3.58 |
Server storage [IO: ▲0.09MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_south-african-covid-19-banner-widget |
db_upgraded |
widget_recent-comments |
widget_recent-posts |
theysaidso_admin_options |
widget_theysaidso_widget |
can_compress_scripts |
Browser metrics Passed 4 tests
An overview of browser requirements for South African Covid-19 Banner
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,811 ▲40 | 13.66 ▼0.71 | 1.59 ▼0.31 | 39.93 ▼2.39 |
Dashboard /wp-admin | 2,205 ▲17 | 5.98 ▲0.08 | 112.52 ▲10.54 | 67.20 ▲22.62 |
Posts /wp-admin/edit.php | 2,100 ▲8 | 2.01 ▼0.16 | 33.50 ▼6.77 | 30.01 ▼5.41 |
Add New Post /wp-admin/post-new.php | 1,677 ▲148 | 21.43 ▼1.55 | 751.16 ▲89.92 | 48.82 ▼3.52 |
Media Library /wp-admin/upload.php | 1,402 ▲14 | 4.24 ▲0.04 | 103.46 ▲1.11 | 49.83 ▲4.66 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
- Zombie WordPress options were found after uninstall: 7 options
- db_upgraded
- widget_recent-posts
- can_compress_scripts
- theysaidso_admin_options
- widget_south-african-covid-19-banner-widget
- widget_recent-comments
- widget_theysaidso_widget
Smoke tests 75% 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 50% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
- 7× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/south-african-covid-19-banner/src/widget.php:13
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/south-african-covid-19-banner/src/html/admin/settings.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/south-african-covid-19-banner/src/html/admin/form.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function SeagynDavis\\SouthAfricaCovid19Banner\\plugin_dir_path() in wp-content/plugins/south-african-covid-19-banner/south-african-covid-19-banner.php:41
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/south-african-covid-19-banner/src/html/page-banner.php:14
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/south-african-covid-19-banner/src/html/banner.php:14
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/south-african-covid-19-banner/src/widget.php:13
- > 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 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
- Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line (
=== south-african-covid-19-banner ===
)
south-african-covid-19-banner/south-african-covid-19-banner.php 92% from 13 tests
The main file in "South African Covid-19 Banner" v. 0.2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
- Requires PHP: The required version number must match the one declared in readme.txt ("7.2" instead of "5.6")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin372 lines of code in 13 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 11 | 62 | 131 | 230 |
CSS | 2 | 26 | 0 | 142 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.16 |
Average class complexity | 1.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 1.00 |
Average method complexity | 1.00 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 1.00 |
Code structure | ||
---|---|---|
Namespaces | 5 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 2 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 2 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 11 | |
▷ Named functions | 9 | 81.82% |
▷ Anonymous functions | 2 | 18.18% |
Constants | 3 | |
▷ Global constants | 3 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
resources/images/sacovid19.png | 76.47KB | 22.69KB | ▼ 70.33% |
resources/images/flag.png | 1.51KB | 1.21KB | ▼ 19.94% |