Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼7.22ms] Passed 4 tests
Analyzing server-side resources used by Feel the Bern Badge for Bernie Sanders
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 39.72 ▲2.89 |
Dashboard /wp-admin | 3.32 ▼0.03 | 44.97 ▼13.92 |
Posts /wp-admin/edit.php | 3.37 ▲0.01 | 43.85 ▲1.24 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.01 | 77.68 ▼16.38 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 34.70 ▲0.19 |
Bern Badge /wp-admin/options-general.php?page=bern-badge-for-bernie-sanders/bern-badge.php | 3.26 | 30.71 |
Server storage [IO: ▲0.43MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
widget_recent-posts |
can_compress_scripts |
theysaidso_admin_options |
widget_theysaidso_widget |
widget_recent-comments |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Feel the Bern Badge for Bernie Sanders
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,005 ▲259 | 13.50 ▼1.21 | 11.27 ▲9.62 | 43.92 ▲3.68 |
Dashboard /wp-admin | 2,200 ▲20 | 5.55 ▼0.09 | 94.91 ▼2.73 | 43.41 ▲7.20 |
Posts /wp-admin/edit.php | 2,108 ▲11 | 1.98 ▼0.04 | 34.78 ▲0.89 | 32.97 ▼1.89 |
Add New Post /wp-admin/post-new.php | 1,533 ▼4 | 22.99 ▲4.42 | 651.20 ▼3.87 | 68.04 ▲11.69 |
Media Library /wp-admin/upload.php | 1,411 ▲11 | 4.17 ▼0.07 | 96.22 ▼5.25 | 42.78 ▼0.79 |
Bern Badge /wp-admin/options-general.php?page=bern-badge-for-bernie-sanders/bern-badge.php | 980 | 1.82 | 27.46 | 36.55 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-posts
- widget_theysaidso_widget
- widget_recent-comments
- db_upgraded
- can_compress_scripts
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested
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
Please take a closer look at the following
- 2× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function BernBadge\\register_activation_hook() in wp-content/plugins/bern-badge-for-bernie-sanders/bern-badge.php:305
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/bern-badge-for-bernie-sanders/settings.php:6
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: bern, bernie sanders, bernie, feel the bern, bern badge
bern-badge-for-bernie-sanders/bern-badge.php 85% from 13 tests
"Feel the Bern Badge for Bernie Sanders" version 1.1.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
- Main file name: Name the main plugin file the same as the plugin slug ("bern-badge-for-bernie-sanders.php" instead of "bern-badge.php")
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 plugin589 lines of code in 8 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 66 | 94 | 282 |
JavaScript | 3 | 40 | 12 | 181 |
CSS | 3 | 20 | 0 | 126 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 20.00 |
▷ Minimum class complexity | 20.00 |
▷ Maximum class complexity | 20.00 |
Average method complexity | 1.83 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 11.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 | 23 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 23 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 4 | 100.00% |
▷ Public constants | 4 | 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
23 PNG files occupy 0.40MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/bern-badge-left-black-en-1.png | 8.10KB | 4.80KB | ▼ 40.72% |
images/bern-badge-right-blue-en-5.png | 37.17KB | 9.99KB | ▼ 73.12% |
images/bern-badge-left-blue-en-3.png | 10.56KB | 5.00KB | ▼ 52.64% |
images/bern-badge-left-white-en-2.png | 11.75KB | 5.25KB | ▼ 55.34% |
images/bern-badge-right-blue-en-7.png | 24.97KB | 5.07KB | ▼ 79.69% |