Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
- The plugin cannot be installed
- > Deprecated in wp-content/plugins/beer-ratings/includes/BeerRatings.php+20
Methods with the same name as their class will not be constructors in a future version of PHP; BeerRatings has a deprecated constructor
Server metrics [RAM: ▼1.84MB] [CPU: ▼53.04ms] Passed 4 tests
This is a short check of server-side resources used by Beer Ratings
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.14 ▼1.32 | 4.36 ▼41.87 |
Dashboard /wp-admin | 2.16 ▼1.14 | 5.27 ▼44.36 |
Posts /wp-admin/edit.php | 2.16 ▼1.19 | 7.09 ▼40.65 |
Add New Post /wp-admin/post-new.php | 2.16 ▼3.72 | 6.08 ▼85.29 |
Media Library /wp-admin/upload.php | 2.16 ▼1.06 | 6.12 ▼29.92 |
Beer Ratings /wp-admin/options-general.php?page=beerratings-settings | 2.16 | 5.77 |
Server storage [IO: ▲0.30MB] [DB: ▲0.01MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 33 new files
Database: no new tables, 41 new options
New WordPress options |
---|
beerratings_ratebeer_copyrightlink |
beerratings_brewerlist_header |
beerratings_beerlist_item |
beerratings_placelist_footer |
widget_recent-posts |
beerratings_beerlist_top50_footer |
beerratings_beerlist_bystyle_item |
beerratings_placelist_header |
beerratings_beerreviewlist_header |
beerratings_cachetime |
... |
Browser metrics Passed 4 tests
An overview of browser requirements for Beer Ratings
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,814 ▲68 | 13.31 ▼1.07 | 4.77 ▲2.88 | 39.20 ▼0.99 |
Dashboard /wp-admin | 2,217 ▲29 | 5.81 ▲0.94 | 106.46 ▼4.59 | 41.48 ▼5.41 |
Posts /wp-admin/edit.php | 2,105 ▲19 | 2.02 ▲0.03 | 42.47 ▲5.23 | 35.68 ▲0.31 |
Add New Post /wp-admin/post-new.php | 1,527 ▼6 | 17.56 ▼5.69 | 682.37 ▲5.64 | 50.68 ▼9.28 |
Media Library /wp-admin/upload.php | 1,405 ▲17 | 4.22 ▼0.04 | 100.74 ▼12.94 | 45.41 ▼3.23 |
Beer Ratings /wp-admin/options-general.php?page=beerratings-settings | 981 | 2.05 | 24.15 | 32.19 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
- The plugin did not uninstall gracefully
- > Deprecated in wp-content/plugins/beer-ratings/includes/BeerRatings.php+20
Methods with the same name as their class will not be constructors in a future version of PHP; BeerRatings has a deprecated constructor
- The uninstall procedure has failed, leaving 11 options in the database
- beerratings_beerlist_bestbyseason_item
- beerratings_beerlist_bestbycountry_header
- beerratings_beerlist_bestbyseason_header
- beerratings_beerlist_bestbycountry_footer
- widget_recent-posts
- widget_theysaidso_widget
- theysaidso_admin_options
- beerratings_beerlist_bestbycountry_item
- widget_recent-comments
- db_upgraded
- ...
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
- > GET request to /wp-admin/options-general.php?page=beerratings-settings
- > Deprecated in wp-content/plugins/beer-ratings/includes/BeerRatings.php+20
Methods with the same name as their class will not be constructors in a future version of PHP; BeerRatings has a deprecated constructor
- > GET request to /wp-admin/options-general.php?page=beerratings-settings
- > Deprecated in wp-content/plugins/beer-ratings/includes/BeerRatings_CacheManager.php+19
Methods with the same name as their class will not be constructors in a future version of PHP; BeerRatings_CacheManager has a deprecated constructor
- > GET request to /wp-admin/options-general.php?page=beerratings-settings
- > Deprecated in wp-content/plugins/beer-ratings/includes/RateBeer/RateBeer.php+19
Methods with the same name as their class will not be constructors in a future version of PHP; RateBeer has a deprecated constructor
- > GET request to /wp-admin/options-general.php?page=beerratings-settings
- > Deprecated in wp-includes/class-wp-hook.php+310
Non-static method BeerRatings::admin_menu() should not be called statically
- > GET request to /wp-admin/options-general.php?page=beerratings-settings
- > Deprecated in wp-includes/class-wp-hook.php+310
Non-static method BeerRatings::admin_enqueue_scripts() should not be called statically
- > GET request to /wp-admin/options-general.php?page=beerratings-settings
- > Deprecated in wp-includes/class-wp-hook.php+310
Non-static method BeerRatings::admin_notice() should not be called statically
- > GET request to /wp-admin/options-general.php?page=beerratings-settings
- > Deprecated in wp-includes/class-wp-hook.php+310
Non-static method BeerRatings_Settings::plugin_options() should not be called statically
- > GET request to /wp-admin/options-general.php?page=beerratings-settings
- > Deprecated in wp-content/plugins/beer-ratings/includes/BeerRatings_Settings.php+64
Non-static method BeerRatings_Settings::settings_tabs() should not be called statically
SRP 0% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
- 8× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/beer-ratings/assets/html/index.php
- > /wp-content/plugins/beer-ratings/includes/index.php
- > /wp-content/plugins/beer-ratings/assets/images/index.php
- > /wp-content/plugins/beer-ratings/assets/index.php
- > /wp-content/plugins/beer-ratings/cache/index.php
- > /wp-content/plugins/beer-ratings/assets/js/index.php
- > /wp-content/plugins/beer-ratings/assets/css/index.php
- > /wp-content/plugins/beer-ratings/includes/RateBeer/index.php
- 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Class 'RateBeer' not found in wp-content/plugins/beer-ratings/includes/RateBeer/RateBeer_Beer_Review.php:19
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/beer-ratings/index.php:46
- > PHP Fatal error
Uncaught Error: Class 'RateBeer' not found in wp-content/plugins/beer-ratings/includes/RateBeer/RateBeer_Brewer.php:19
- > PHP Fatal error
Uncaught Error: Class 'RateBeer' not found in wp-content/plugins/beer-ratings/includes/RateBeer/RateBeer_Place.php:19
- > PHP Fatal error
Uncaught Error: Class 'RateBeer' not found in wp-content/plugins/beer-ratings/includes/RateBeer/RateBeer_Beer.php:19
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found
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
These attributes need your attention:
- Screenshots: Add images for these screenshots: #1 (Example listing of 2 beers), #2 (Example listing of Best Beer by Style), #3 (Example listing of all beers by specific brewer), #4 (Settings tab of options page), #5 (Format/Layouts tab of options page showing header, footer, item)
beer-ratings/index.php 92% from 13 tests
This is the main PHP file of "Beer Ratings" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("beer-ratings.php" instead of "index.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected4,792 lines of code in 16 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 12 | 555 | 619 | 3,170 |
HTML | 2 | 29 | 35 | 1,546 |
CSS | 1 | 9 | 0 | 69 |
JavaScript | 1 | 4 | 1 | 7 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.32 |
Average class complexity | 46.00 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 185.00 |
Average method complexity | 6.70 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 80.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 10 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 10 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 79 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 79 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.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
9 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-2.png | 7.79KB | 5.64KB | ▼ 27.64% |
assets/images/arrows-dark.png | 0.48KB | 0.24KB | ▼ 51.11% |
screenshot-5.png | 24.85KB | 12.50KB | ▼ 49.68% |
screenshot-1.png | 13.93KB | 11.40KB | ▼ 18.18% |
assets/images/ratebeer-api-tiny.png | 0.48KB | 0.43KB | ▼ 10.82% |