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
Installer ran successfully
Server metrics [RAM: ▲0.42MB] [CPU: ▼5.82ms] Passed 4 tests
This is a short check of server-side resources used by Brickset API
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.82 ▲0.35 | 39.54 ▼5.21 |
Dashboard /wp-admin | 3.79 ▲0.48 | 51.38 ▼7.22 |
Posts /wp-admin/edit.php | 3.84 ▲0.48 | 57.27 ▲10.26 |
Add New Post /wp-admin/post-new.php | 6.31 ▲0.42 | 100.44 ▼13.11 |
Media Library /wp-admin/upload.php | 3.65 ▲0.42 | 40.95 ▲2.25 |
Welcome to Brickset API /wp-admin/index.php?page=bs-about | 3.61 | 35.79 |
Welcome to Brickset API /wp-admin/index.php?page=bs-credits | 3.62 | 400.21 |
Brickset API /wp-admin/options-general.php?page=brickset-api-options | 3.61 | 32.88 |
Server storage [IO: ▲0.16MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, 12 new options
New WordPress options |
---|
can_compress_scripts |
widget_brickset_theme_widget |
widget_recent-posts |
brickset_oembed_key |
widget_recent-comments |
db_upgraded |
theysaidso_admin_options |
widget_brickset_theme_years_widget |
widget_brickset_minifig_owned_widget |
widget_brickset_set_widget |
... |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Brickset API
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,807 ▲61 | 13.22 ▼1.21 | 5.28 ▲3.50 | 43.84 ▼1.23 |
Dashboard /wp-admin | 2,216 ▲28 | 4.86 ▼0.09 | 108.31 ▲2.17 | 41.88 ▲4.33 |
Posts /wp-admin/edit.php | 2,096 ▲7 | 2.03 ▲0.01 | 41.88 ▲1.47 | 37.08 ▲1.71 |
Add New Post /wp-admin/post-new.php | 1,520 ▼4 | 17.77 ▼5.53 | 647.68 ▲13.93 | 53.27 ▼1.14 |
Media Library /wp-admin/upload.php | 1,389 ▲1 | 4.19 ▼0.01 | 99.43 ▲4.22 | 43.76 ▲1.52 |
Welcome to Brickset API /wp-admin/index.php?page=bs-about | 847 | 2.14 | 27.06 | 45.50 |
Welcome to Brickset API /wp-admin/index.php?page=bs-credits | 780 | 2.03 | 26.43 | 32.63 |
Brickset API /wp-admin/options-general.php?page=brickset-api-options | 857 | 2.07 | 24.71 | 28.45 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 successfully, leaving 12 options in the database
- brickset-api-settings
- widget_brickset_set_widget
- widget_theysaidso_widget
- brickset_oembed_key
- widget_brickset_theme_years_widget
- db_upgraded
- widget_recent-posts
- widget_brickset_theme_widget
- 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 | 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
The following issues need your attention
- 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'BricksetAPIUtilities' not found in wp-content/plugins/brickset-api/inc/class-update-functions.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/brickset-api/inc/widgets/class-theme-widget.php:4
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/brickset-api/inc/widgets/class-set-widget.php:4
- > PHP Fatal error
Uncaught Error: Class 'BricksetAPIUtilities' not found in wp-content/plugins/brickset-api/inc/class-search-functions.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/brickset-api/brickset-api.php:24
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/brickset-api/inc/widgets/class-minifig-owned-widget.php:4
- > PHP Fatal error
Uncaught Error: Class 'BricksetAPISearch' not found in wp-content/plugins/brickset-api/inc/class-shortcodes.php:3
- > PHP Fatal error
Uncaught Error: Class 'BricksetAPISearch' not found in wp-content/plugins/brickset-api/inc/class-oembed.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/brickset-api/admin/class-settings-page.php:14
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/brickset-api/inc/widgets/class-theme-years-widget.php:4
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: brickset, brick, lego
brickset-api/brickset-api.php 92% from 13 tests
The primary PHP file in "Brickset API" version 1.4.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
- Description: Please keep the plugin description shorter than 140 characters (currently 306 characters long)
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
Success! There were no dangerous files found in this plugin2,646 lines of code in 16 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 14 | 399 | 1,224 | 1,719 |
JSON | 1 | 0 | 0 | 671 |
PO File | 1 | 103 | 125 | 256 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.30 |
Average class complexity | 16.31 |
▷ Minimum class complexity | 4.00 |
▷ Maximum class complexity | 54.00 |
Average method complexity | 3.21 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 15.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 13 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 13 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 90 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 78 | 86.67% |
▷ Protected methods | 11 | 12.22% |
▷ Private methods | 1 | 1.11% |
Functions | 10 | |
▷ Named functions | 10 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 5 | |
▷ Global constants | 5 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/theme-years-widget.png | 18.65KB | 4.21KB | ▼ 77.45% |
assets/images/owned-minifig-widget.png | 12.24KB | 2.91KB | ▼ 76.23% |