Benchmarks
Plugin footprint 23% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
- This plugin did not install gracefully
- > User deprecated in wp-includes/functions.php+5453
Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.
Server metrics [RAM: ▼0.70MB] [CPU: ▼34.20ms] Passed 4 tests
This is a short check of server-side resources used by Open Badge Factory
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.25 ▼0.22 | 21.07 ▼28.01 |
Dashboard /wp-admin | 3.32 ▲0.02 | 25.10 ▼23.00 |
Posts /wp-admin/edit.php | 3.32 ▼0.03 | 25.21 ▼21.26 |
Add New Post /wp-admin/post-new.php | 3.32 ▼2.57 | 25.10 ▼64.51 |
Media Library /wp-admin/upload.php | 3.32 ▲0.09 | 22.55 ▼14.49 |
Settings /wp-admin/admin.php?page=badgeos_settings | 3.32 | 23.23 |
Connection Types /wp-admin/tools.php?page=connection-types | 3.32 | 23.00 |
Badges /wp-admin/edit.php?post_type=badge | 3.32 | 23.62 |
OBF Integration /wp-admin/admin.php?page=badgeos_sub_obf_integration | 3.32 | 23.31 |
Log Entries /wp-admin/edit.php?post_type=badgeos-log-entry | 3.32 | 23.01 |
Nominations /wp-admin/edit.php?post_type=nomination | 3.32 | 22.95 |
Add-Ons /wp-admin/options.php?page=badgeos_sub_add_ons | 3.32 | 23.63 |
Help / Support /wp-admin/admin.php?page=badgeos_sub_help_support | 3.32 | 21.04 |
Submissions /wp-admin/edit.php?post_type=submission | 3.32 | 25.34 |
Achievement Types /wp-admin/edit.php?post_type=achievement-type | 3.32 | 21.98 |
Server storage [IO: ▲3.12MB] [DB: ▲0.01MB] Passed 3 tests
Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 415 new files
Database: 2 new tables, 13 new options
New tables |
---|
wp_p2pmeta |
wp_p2p |
New WordPress options |
---|
can_compress_scripts |
obf_settings |
widget_theysaidso_widget |
widget_credly_credit_issuer_widget |
badgeos_settings |
widget_earned_user_achievements_widget |
widget_recent-posts |
p2p_storage |
db_upgraded |
credly_settings |
... |
Browser metrics Passed 4 tests
An overview of browser requirements for Open Badge Factory
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 4,238 ▲1,467 | 16.63 ▲2.24 | 7.57 ▲5.33 | 40.90 ▼3.00 |
Dashboard /wp-admin | 3,476 ▲1,291 | 6.77 ▲0.83 | 149.01 ▲32.97 | 104.74 ▲61.78 |
Posts /wp-admin/edit.php | 3,392 ▲1,303 | 4.47 ▲2.46 | 72.35 ▲35.40 | 80.55 ▲44.82 |
Add New Post /wp-admin/post-new.php | 2,484 ▲956 | 23.98 ▲0.58 | 641.43 ▼27.39 | 199.66 ▲142.33 |
Media Library /wp-admin/upload.php | 2,566 ▲1,175 | 5.58 ▲1.33 | 108.89 ▲7.55 | 59.23 ▲15.77 |
Settings /wp-admin/admin.php?page=badgeos_settings | 2,408 | 4.09 | 66.10 | 76.06 |
Connection Types /wp-admin/tools.php?page=connection-types | 2,130 | 3.97 | 69.14 | 79.93 |
Badges /wp-admin/edit.php?post_type=badge | 2,398 | 4.36 | 70.71 | 80.82 |
OBF Integration /wp-admin/admin.php?page=badgeos_sub_obf_integration | 2,281 | 4.10 | 65.53 | 77.24 |
Log Entries /wp-admin/edit.php?post_type=badgeos-log-entry | 3,016 | 4.31 | 72.81 | 75.05 |
Nominations /wp-admin/edit.php?post_type=nomination | 2,390 | 4.37 | 68.49 | 70.27 |
Add-Ons /wp-admin/options.php?page=badgeos_sub_add_ons | 2,089 | 3.98 | 64.64 | 71.65 |
Help / Support /wp-admin/admin.php?page=badgeos_sub_help_support | 2,676 | 4.09 | 67.38 | 99.36 |
Submissions /wp-admin/edit.php?post_type=submission | 2,411 | 4.28 | 70.83 | 79.36 |
Achievement Types /wp-admin/edit.php?post_type=achievement-type | 2,902 | 4.43 | 75.65 | 59.97 |
Uninstaller [IO: ▲0.05MB] [DB: ▲0.01MB] 25% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
- This plugin did not uninstall without warnings or errors
- > Warning in wp-content/plugins/open-badge-factory/includes/cmb/init.php+755
count(): Parameter must be an array or an object that implements Countable
- The plugin did not uninstall successfully, leaving 2 tables in the database
- wp_p2pmeta
- wp_p2p
- This plugin does not fully uninstall, leaving 13 options in the database
- p2p_storage
- widget_recent-comments
- obf_settings
- widget_p2p
- widget_theysaidso_widget
- widget_credly_credit_issuer_widget
- widget_earned_user_achievements_widget
- can_compress_scripts
- widget_recent-posts
- credly_settings
- ...
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
- 75 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=achievement-type
- > POST request to /wp-admin/admin-ajax.php
- > Warning in wp-content/plugins/open-badge-factory/includes/obf_svg_support.php+72
count(): Parameter must be an array or an object that implements Countable
- 10 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=achievement-type
- > User deprecated in wp-includes/functions.php+5828
Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
- > GET request to /wp-admin/tools.php?page=connection-types
- > 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/tools.php?page=connection-types
- > 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
The following issues need your attention
- 159× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Stream\\StreamInterface' not found in wp-content/plugins/open-badge-factory/vendor/guzzlehttp/streams/src/Stream.php:7
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/open-badge-factory/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function scb_register_table() in wp-content/plugins/open-badge-factory/includes/p2p/p2p-core/storage.php:11
- > PHP Fatal error
Uncaught Error: Class 'P2P_Side_Post' not found in wp-content/plugins/open-badge-factory/includes/p2p/p2p-core/side-attachment.php:3
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Event\\SubscriberInterface' not found in wp-content/plugins/open-badge-factory/vendor/guzzlehttp/guzzle/src/Subscriber/Prepare.php:24
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Stream\\StreamInterface' not found in wp-content/plugins/open-badge-factory/vendor/guzzlehttp/streams/src/LimitStream.php:9
- > PHP Fatal error
Uncaught Error: Interface 'React\\Promise\\ExtendedPromiseInterface' not found in wp-content/plugins/open-badge-factory/vendor/react/promise/src/FulfilledPromise.php:5
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Stream\\StreamInterface' not found in wp-content/plugins/open-badge-factory/vendor/guzzlehttp/streams/src/CachingStream.php:10
- > PHP Fatal error
Uncaught Error: Class 'P2P_Factory' not found in wp-content/plugins/open-badge-factory/includes/p2p/p2p-admin/dropdown-factory.php:3
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Ring\\Future\\CompletedFutureValue' not found in wp-content/plugins/open-badge-factory/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureArray.php:7
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
- > GET request to /wp-admin/admin.php?page=badgeos_sub_help_support
- > Network (severe)
wp-content/plugins/open-badge-factory//doc/install/generated_api_key.png - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/admin.php?page=badgeos_sub_help_support
- > Network (severe)
wp-content/plugins/open-badge-factory//doc/install/wp_plugin_steps.png - Failed to load resource: the server responded with a status of 404 (Not Found)
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
- Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
open-badge-factory/open-badge-factory.php 85% from 13 tests
The main PHP script in "Open Badge Factory" version 1.4.7.5 is automatically included on every request by WordPress
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
- Description: Please don't use more than 140 characters for the plugin description (currently 260 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin43,166 lines of code in 350 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 255 | 6,612 | 11,242 | 24,991 |
JavaScript | 19 | 1,552 | 1,706 | 5,893 |
PO File | 5 | 1,622 | 2,505 | 4,313 |
Markdown | 8 | 712 | 0 | 2,736 |
reStructuredText | 19 | 1,222 | 1,570 | 2,029 |
CSS | 10 | 219 | 59 | 1,901 |
JSON | 6 | 0 | 0 | 363 |
make | 5 | 78 | 10 | 333 |
CoffeeScript | 1 | 127 | 6 | 306 |
HTML | 12 | 7 | 0 | 110 |
YAML | 4 | 18 | 0 | 79 |
XML | 4 | 2 | 0 | 71 |
Python | 2 | 10 | 0 | 41 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.39 |
Average class complexity | 12.30 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 177.00 |
Average method complexity | 2.61 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 43.00 |
Code structure | ||
---|---|---|
Namespaces | 15 | |
Interfaces | 26 | |
Traits | 6 | |
Classes | 184 | |
▷ Abstract classes | 16 | 8.70% |
▷ Concrete classes | 168 | 91.30% |
▷ Final classes | 2 | 1.19% |
Methods | 1,606 | |
▷ Static methods | 277 | 17.25% |
▷ Public methods | 1,326 | 82.57% |
▷ Protected methods | 105 | 6.54% |
▷ Private methods | 175 | 10.90% |
Functions | 459 | |
▷ Named functions | 383 | 83.44% |
▷ Anonymous functions | 76 | 16.56% |
Constants | 28 | |
▷ Global constants | 6 | 21.43% |
▷ Class constants | 22 | 78.57% |
▷ Public constants | 22 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
34 PNG files occupy 0.53MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/badgeos_icon.png | 1.62KB | 0.70KB | ▼ 56.70% |
includes/p2p/p2p-admin/images/plus.png | 0.12KB | 0.12KB | ▼ 1.57% |
images/arrows.png | 1.71KB | 0.91KB | ▼ 46.81% |
js/select2/select2x2.png | 0.83KB | 0.77KB | ▼ 6.15% |
includes/cmb/images/ui-bg_glass_55_fbf9ee_1x400.png | 0.12KB | 0.14KB | 0.00% |