Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.04MB] [CPU: ▼6.82ms] Passed 4 tests
Server-side resources used by UK Food Hygiene Rating
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.50 ▲0.04 | 39.78 ▼3.99 |
Dashboard /wp-admin | 3.35 ▲0.05 | 50.74 ▼1.70 |
Posts /wp-admin/edit.php | 3.40 ▲0.04 | 48.24 ▼5.75 |
Add New Post /wp-admin/post-new.php | 5.93 ▲0.04 | 85.96 ▼15.84 |
Media Library /wp-admin/upload.php | 3.28 ▲0.04 | 40.51 ▲1.37 |
UK Food Hygiene Rating /wp-admin/options-general.php?page=uk-food-hygiene-rating | 3.22 | 33.01 |
Server storage [IO: ▲0.92MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-posts |
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-comments |
db_upgraded |
Browser metrics Passed 4 tests
This is an overview of browser requirements for UK Food Hygiene Rating
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,793 ▲7 | 14.27 ▼0.26 | 1.85 ▼0.38 | 43.23 ▼3.65 |
Dashboard /wp-admin | 2,193 ▲13 | 5.54 ▼0.17 | 84.52 ▼16.87 | 39.93 ▼6.00 |
Posts /wp-admin/edit.php | 2,104 ▲4 | 2.01 ▼0.01 | 34.60 ▼3.16 | 33.61 ▼0.00 |
Add New Post /wp-admin/post-new.php | 1,529 ▲3 | 22.76 ▼0.15 | 600.12 ▼90.27 | 50.84 ▼2.76 |
Media Library /wp-admin/upload.php | 1,404 ▲7 | 4.12 ▼0.07 | 104.71 ▼4.72 | 45.58 ▲0.63 |
UK Food Hygiene Rating /wp-admin/options-general.php?page=uk-food-hygiene-rating | 935 | 2.04 | 22.92 | 30.50 |
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
The following items require your attention
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-posts
- widget_recent-comments
- can_compress_scripts
- widget_theysaidso_widget
- theysaidso_admin_options
- db_upgraded
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
- > GET request to /wp-admin/options-general.php?page=uk-food-hygiene-rating
- > Notice in wp-content/plugins/uk-food-hygiene-rating/options.php+65
Trying to access array offset on value of type bool
SRP 50% 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
- 3× PHP files trigger server errors when accessed directly:
- > PHP Warning
Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/uk-food-hygiene-rating/uk-food-hygiene-rating.php on line 12
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/uk-food-hygiene-rating/uk-food-hygiene-rating.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/uk-food-hygiene-rating/options.php:2
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
- Contributors: Plugin contributors not specified
uk-food-hygiene-rating/uk-food-hygiene-rating.php Passed 13 tests
"UK Food Hygiene Rating" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
63 characters long description:
Show UK Food Agency hygiene rating on your wordpress blog posts
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected229 lines of code in 3 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 44 | 11 | 229 |
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.19 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 13 | |
▷ Named functions | 13 | 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
Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin