Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.02MB] [CPU: ▼291.07ms] Passed 4 tests
Analyzing server-side resources used by WP Restaurant Menu
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.55 ▲0.04 | 55.07 ▲3.43 |
Dashboard /wp-admin | 3.46 ▲0.05 | 38.24 ▼8.61 |
Posts /wp-admin/edit.php | 3.69 ▲0.05 | 88.84 ▲48.38 |
Add New Post /wp-admin/post-new.php | 6.92 ▼0.05 | 93.32 ▼1,143.05 |
Media Library /wp-admin/upload.php | 3.34 ▲0.04 | 30.17 ▼16.04 |
Food Menu /wp-admin/options-general.php?page=food-settings | 3.31 | 22.89 |
Menu Groups /wp-admin/edit-tags.php?taxonomy=menu-groups&post_type=foodmenu | 3.33 | 24.53 |
All Menu Items /wp-admin/edit.php?post_type=foodmenu | 3.38 | 25.88 |
Add New /wp-admin/post-new.php?post_type=foodmenu | 3.70 | 47.51 |
Server storage [IO: ▲0.08MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
This is an overview of browser requirements for WP Restaurant Menu
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,844 ▲101 | 16.01 ▼0.14 | 7.12 ▲0.37 | 2.09 ▲0.00 |
Dashboard /wp-admin | 2,945 ▲91 | 6.23 ▲0.07 | 115.51 ▼23.34 | 163.57 ▼4.16 |
Posts /wp-admin/edit.php | 2,742 ▲57 | 3.25 ▲0.02 | 64.61 ▼32.11 | 146.53 ▲1.15 |
Add New Post /wp-admin/post-new.php | 1,669 ▼40 | 20.82 ▼0.80 | 409.52 ▼55.37 | 173.17 ▲8.87 |
Media Library /wp-admin/upload.php | 1,753 ▲55 | 5.47 ▼0.06 | 145.30 ▼6.19 | 180.69 ▼13.36 |
Food Menu /wp-admin/options-general.php?page=food-settings | 1,121 | 2.75 | 55.55 | 203.02 |
Menu Groups /wp-admin/edit-tags.php?taxonomy=menu-groups&post_type=foodmenu | 1,673 | 2.79 | 70.39 | 151.92 |
All Menu Items /wp-admin/edit.php?post_type=foodmenu | 1,438 | 2.93 | 60.75 | 111.88 |
Add New /wp-admin/post-new.php?post_type=foodmenu | 3,468 | 9.99 | 237.71 | 220.96 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables
Smoke tests 25% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
- 1× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/wp-restaurant-menu/extends/settings.php
- 6× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-restaurant-menu/extends/meta-box.php:125
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-restaurant-menu/extends/settings-panel.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-restaurant-menu/extends/init.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-restaurant-menu/extends/admin-head.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-restaurant-menu/extends/shortcode.php:484
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-restaurant-menu/extends/init.php:2
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
- > GET request to /wp-admin/options-general.php?page=food-settings
- > Network (severe)
wp-content/plugins/food-menu/js/jquery-ui-1.8.4.custom.min.js - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/options-general.php?page=food-settings
- > Console-api (warning) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31592 "jQuery.Deferred exception: jQuery(...).sortable is not a function" "TypeError: jQuery(...).sortable is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/options-general.php?page=food-settings:238:32)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30340)" undefined
- > GET request to /wp-admin/options-general.php?page=food-settings
- > Javascript (severe) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31702 Uncaught TypeError: jQuery(...).sortable is not a function
- > GET request to /wp-admin/post-new.php?post_type=foodmenu
- > Network (severe)
wp-content/plugins/wp-restaurant-menu/extends/jquery.cmbScripts.js?ver=5.9.2 - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/post-new.php?post_type=foodmenu
- > Network (severe)
wp-content/plugins/wp-restaurant-menu/extends/css/food-menu-admin.css - Failed to load resource: the server responded with a status of 404 (Not Found)
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
8 plugin tags: template function, bars, shortcode, restaurants, food...
wp-restaurant-menu/food-menu.php 92% from 13 tests
The main PHP script in "WP Restaurant Menu" version 1.0 is automatically included on every request by WordPress
You should first fix the following items:
- Main file name: The principal plugin file should be the same as the plugin slug ("wp-restaurant-menu.php" instead of "food-menu.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
Everything looks great! No dangerous files found in this plugin1,452 lines of code in 9 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 7 | 185 | 141 | 1,096 |
CSS | 2 | 29 | 44 | 356 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.47 |
Average class complexity | 62.50 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 123.00 |
Average method complexity | 18.57 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 69.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 7 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 7 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 15 | |
▷ Named functions | 15 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/icon.png | 2.98KB | 1.70KB | ▼ 42.89% |