Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
- This plugin did not install gracefully
- > Warning in wp-content/plugins/announcement-bar/announcement.php+226
Use of undefined constant ANNOUNCEMENT_BAR_POST_TYPE - assumed 'ANNOUNCEMENT_BAR_POST_TYPE' (this will throw an Error in a future version of PHP)
Server metrics [RAM: ▲0.16MB] [CPU: ▼6.42ms] Passed 4 tests
Server-side resources used by Announcement Bar
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.57 ▲0.11 | 38.29 ▼2.45 |
Dashboard /wp-admin | 3.49 ▲0.15 | 45.69 ▼14.42 |
Posts /wp-admin/edit.php | 3.61 ▲0.25 | 46.62 ▲4.18 |
Add New Post /wp-admin/post-new.php | 6.07 ▲0.19 | 81.89 ▼12.97 |
Media Library /wp-admin/upload.php | 3.42 ▲0.19 | 41.08 ▲6.07 |
Announcement Bar /wp-admin/options-general.php?page=announcement-bar | 3.30 | 29.59 |
Announcements /wp-admin/edit.php?post_type=announcement | 3.46 | 36.75 |
Add New /wp-admin/post-new.php?post_type=announcement | 3.45 | 42.11 |
Server storage [IO: ▲0.35MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-comments |
theysaidso_admin_options |
widget_recent-posts |
announcement_bar_settings |
can_compress_scripts |
widget_theysaidso_widget |
db_upgraded |
Browser metrics Passed 4 tests
Checking browser requirements for Announcement Bar
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,837 ▲91 | 14.73 ▲0.37 | 1.90 ▲0.22 | 42.31 ▼5.45 |
Dashboard /wp-admin | 2,240 ▲55 | 4.83 ▼0.08 | 95.65 ▼20.74 | 39.59 ▼4.95 |
Posts /wp-admin/edit.php | 2,123 ▲52 | 2.12 ▲0.07 | 41.66 ▲3.74 | 34.79 ▼1.74 |
Add New Post /wp-admin/post-new.php | 1,562 ▲29 | 23.23 ▲0.11 | 627.42 ▼39.77 | 52.09 ▼1.51 |
Media Library /wp-admin/upload.php | 1,422 ▲31 | 4.19 ▼0.04 | 94.39 ▼11.33 | 40.92 ▼5.91 |
Announcement Bar /wp-admin/options-general.php?page=announcement-bar | 1,815 | 2.54 | 51.67 | 77.30 |
Announcements /wp-admin/edit.php?post_type=announcement | 1,137 | 1.97 | 30.71 | 35.38 |
Add New /wp-admin/post-new.php?post_type=announcement | 1,532 | 2.51 | 48.89 | 55.02 |
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
It is recommended to fix the following
- This plugin did not uninstall successfully, leaving 7 options in the database
- theysaidso_admin_options
- widget_recent-comments
- widget_theysaidso_widget
- announcement_bar_settings
- db_upgraded
- widget_recent-posts
- can_compress_scripts
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
Smoke test failed, please fix the following
- > GET request to /wp-admin/options-general.php?page=announcement-bar
- > User deprecated in wp-includes/functions.php+5463
Function screen_icon is deprecated since version 3.8.0 with no alternative available.
- > GET request to /wp-admin/options-general.php?page=announcement-bar
- > User deprecated in wp-includes/functions.php+5463
Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
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 fix the following
- 4× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/announcement-bar/css/announcement.css.php:13
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/announcement-bar/announcement.php:87
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/announcement-bar/admin/dashboard.php:17
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/announcement-bar/admin/admin.php:10
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
- > GET request to /wp-admin/options-general.php?page=announcement-bar
- > Network (severe)
wp-admin/images/gray-grad.png - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/options-general.php?page=announcement-bar
- > Network (severe)
wp-content/plugins/announcement-bar/js/cross.gif - Failed to load resource: the server responded with a status of 404 (Not Found)
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: announcement bar, stats, announcement, admin, bar
announcement-bar/announcement.php 92% from 13 tests
"Announcement Bar" version 0.4.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
- Main file name: Name the main plugin file the same as the plugin slug ("announcement-bar.php" instead of "announcement.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected2,587 lines of code in 14 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 221 | 317 | 894 |
JavaScript | 3 | 150 | 113 | 788 |
Oracle PL/SQL | 3 | 807 | 4 | 609 |
PO File | 1 | 68 | 78 | 153 |
CSS | 2 | 5 | 4 | 143 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.24 |
Average class complexity | 23.50 |
▷ Minimum class complexity | 13.00 |
▷ Maximum class complexity | 34.00 |
Average method complexity | 2.67 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 8.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 27 | |
▷ Static methods | 5 | 18.52% |
▷ Public methods | 26 | 96.30% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 3.70% |
Functions | 26 | |
▷ Named functions | 26 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 8 | |
▷ Global constants | 6 | 75.00% |
▷ Class constants | 2 | 25.00% |
▷ Public constants | 2 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
js/hv.png | 2.80KB | 7.32KB | 0.00% |
admin/announcement.png | 3.91KB | 1.25KB | ▼ 68.01% |
js/hs.png | 2.62KB | 7.54KB | 0.00% |