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.29MB] [CPU: ▼134.51ms] Passed 4 tests
Server-side resources used by Trendy Restaurant Menu - Best Restaurant Plugin for WordPress
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.09 ▲0.36 | 37.30 ▲9.92 |
Dashboard /wp-admin | 3.39 ▲0.33 | 53.95 ▲10.73 |
Posts /wp-admin/edit.php | 3.44 ▲0.33 | 46.84 ▲1.65 |
Add New Post /wp-admin/post-new.php | 5.68 ▲0.24 | 91.95 ▼554.57 |
Media Library /wp-admin/upload.php | 3.27 ▲0.27 | 36.95 ▲4.95 |
All Restaurant Menus /wp-admin/edit.php?post_type=tr_menu | 3.31 | 34.06 |
Dish Type /wp-admin/edit-tags.php?taxonomy=tr_dish_type&post_type=tr_menu | 3.27 | 33.10 |
Add New /wp-admin/post-new.php?post_type=tr_menu | 3.46 | 50.38 |
Location /wp-admin/edit-tags.php?taxonomy=tr_location_type&post_type=tr_menu | 3.27 | 35.02 |
Meal Type /wp-admin/edit-tags.php?taxonomy=tr_meal_type&post_type=tr_menu | 3.27 | 30.03 |
Settings /wp-admin/edit.php?post_type=tr_menu&page=trendy_restaurant_settings | 3.25 | 31.71 |
Server storage [IO: ▲0.34MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 46 new files
Database: no new tables, 1 new option
New WordPress options |
---|
widget_tr_menu_widget |
Browser metrics Passed 4 tests
Checking browser requirements for Trendy Restaurant Menu - Best Restaurant Plugin for WordPress
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,781 ▲185 | 15.91 ▲0.19 | 9.26 ▼0.07 | 46.19 ▼1.96 |
Dashboard /wp-admin | 3,065 ▲131 | 5.96 ▼0.07 | 139.77 ▼11.97 | 114.10 ▲0.35 |
Posts /wp-admin/edit.php | 2,841 ▲102 | 2.76 ▲0.04 | 68.94 ▲3.95 | 90.83 ▲2.72 |
Add New Post /wp-admin/post-new.php | 1,718 ▲220 | 18.80 ▲0.02 | 357.95 ▼14.90 | 110.12 ▲4.26 |
Media Library /wp-admin/upload.php | 1,909 ▲102 | 5.08 ▲0.06 | 146.91 ▼9.25 | 114.39 ▼1.71 |
All Restaurant Menus /wp-admin/edit.php?post_type=tr_menu | 1,544 | 2.68 | 65.34 | 69.67 |
Dish Type /wp-admin/edit-tags.php?taxonomy=tr_dish_type&post_type=tr_menu | 1,838 | 2.45 | 61.60 | 81.19 |
Add New /wp-admin/post-new.php?post_type=tr_menu | 4,249 | 10.69 | 265.08 | 159.26 |
Location /wp-admin/edit-tags.php?taxonomy=tr_location_type&post_type=tr_menu | 1,852 | 2.41 | 56.42 | 80.24 |
Meal Type /wp-admin/edit-tags.php?taxonomy=tr_meal_type&post_type=tr_menu | 1,838 | 2.44 | 61.32 | 84.70 |
Settings /wp-admin/edit.php?post_type=tr_menu&page=trendy_restaurant_settings | 1,209 | 2.15 | 53.29 | 96.52 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
- The uninstall procedure has failed, leaving 1 option in the database
- widget_tr_menu_widget
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/post-new.php?post_type=tr_menu
- > Warning in wp-content/plugins/trendy-restaurant-menu/include/templates/metaboxes/nutrition_info.php+9
Illegal string offset 'calories'
- 7 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=tr_menu
- > Notice in wp-content/plugins/trendy-restaurant-menu/include/templates/metaboxes/nutrition_info.php+9
Uninitialized string offset: 0
- > GET request to /wp-admin/post-new.php?post_type=tr_menu
- > Warning in wp-content/plugins/trendy-restaurant-menu/include/templates/metaboxes/nutrition_info.php+9
Illegal string offset 'cholesterol'
- > GET request to /wp-admin/post-new.php?post_type=tr_menu
- > Warning in wp-content/plugins/trendy-restaurant-menu/include/templates/metaboxes/nutrition_info.php+9
Illegal string offset 'fiber'
- > GET request to /wp-admin/post-new.php?post_type=tr_menu
- > Warning in wp-content/plugins/trendy-restaurant-menu/include/templates/metaboxes/nutrition_info.php+9
Illegal string offset 'sodium'
- > GET request to /wp-admin/post-new.php?post_type=tr_menu
- > Warning in wp-content/plugins/trendy-restaurant-menu/include/templates/metaboxes/nutrition_info.php+9
Illegal string offset 'carbohydrates'
- > GET request to /wp-admin/post-new.php?post_type=tr_menu
- > Warning in wp-content/plugins/trendy-restaurant-menu/include/templates/metaboxes/nutrition_info.php+9
Illegal string offset 'fat'
- > GET request to /wp-admin/post-new.php?post_type=tr_menu
- > Warning in wp-content/plugins/trendy-restaurant-menu/include/templates/metaboxes/nutrition_info.php+9
Illegal string offset 'protein'
SRP 0% 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
- 6× PHP files output text when accessed directly:
- > /wp-content/plugins/trendy-restaurant-menu/include/templates/grid_items.php
- > /wp-content/plugins/trendy-restaurant-menu/include/templates/center_aligned_menu.php
- > /wp-content/plugins/trendy-restaurant-menu/include/templates/simple_food_menu.php
- > /wp-content/plugins/trendy-restaurant-menu/include/templates/metaboxes/main_items.php
- > /wp-content/plugins/trendy-restaurant-menu/include/templates/default.php
- > /wp-content/plugins/trendy-restaurant-menu/include/templates/metaboxes/nutrition_info.php
- 36× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_get_post_terms() in wp-content/plugins/trendy-restaurant-menu/include/templates/single_menu_content.php:30
- > PHP Notice
Undefined variable: _ninja_restaurant_spicy_level in wp-content/plugins/trendy-restaurant-menu/include/templates/metaboxes/main_items.php on line 32
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/trendy-restaurant-menu/include/templates/center_aligned_menu.php on line 2
- > PHP Notice
Undefined variable: boxes in wp-content/plugins/trendy-restaurant-menu/include/templates/metaboxes/nutrition_info.php on line 2
- > PHP Notice
Undefined variable: ingredients in wp-content/plugins/trendy-restaurant-menu/include/templates/single_menu_content.php on line 19
- > PHP Notice
Undefined variable: _ninja_restaurant_spicy_level in wp-content/plugins/trendy-restaurant-menu/include/templates/metaboxes/main_items.php on line 32
- > PHP Notice
Undefined variable: items in wp-content/plugins/trendy-restaurant-menu/include/templates/default.php on line 2
- > PHP Notice
Undefined variable: nutrition in wp-content/plugins/trendy-restaurant-menu/include/templates/single_menu_content.php on line 2
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/trendy-restaurant-menu/include/templates/settings/settings.php:7
- > PHP Notice
Undefined variable: items in wp-content/plugins/trendy-restaurant-menu/include/templates/center_aligned_menu.php on line 2
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected
Optimizations
Plugin configuration 87% from 29 tests
readme.txt 88% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
- Requires php: The plugin version is formatted incorrectly
- Screenshots: Add an image for screenshot #5 (Simple Styled Menu Items)
trendy-restaurant-menu/trendy_restaurant_menu.php 85% from 13 tests
"Trendy Restaurant Menu - Best Restaurant Plugin for WordPress" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
- Main file name: Name the main plugin file the same as the plugin slug ("trendy-restaurant-menu.php" instead of "trendy_restaurant_menu.php")
- Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin2,618 lines of code in 33 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 4 | 392 | 534 | 1,482 |
PHP | 24 | 157 | 38 | 1,089 |
CSS | 4 | 11 | 0 | 40 |
JSON | 1 | 0 | 0 | 7 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.23 |
Average class complexity | 5.11 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 9.00 |
Average method complexity | 1.85 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 7.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 9 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 9 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 42 | |
▷ Static methods | 31 | 73.81% |
▷ Public methods | 36 | 85.71% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 6 | 14.29% |
Functions | 8 | |
▷ Named functions | 3 | 37.50% |
▷ Anonymous functions | 5 | 62.50% |
Constants | 3 | |
▷ Global constants | 3 | 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 compressed PNG files occupy 0.06MB
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/download-fluent-form.png | 55.29KB | 60.35KB | 0.00% |
assets/images/mce_icon.png | 2.45KB | 2.12KB | ▼ 13.81% |