Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲1.72MB] [CPU: ▲5.16ms] Passed 4 tests
An overview of server-side resources used by Five Star Restaurant Menu and Food Ordering
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 5.17 ▲1.70 | 47.97 ▲6.79 |
Dashboard /wp-admin | 5.05 ▲1.71 | 61.50 ▼3.04 |
Posts /wp-admin/edit.php | 5.11 ▲1.75 | 70.85 ▲22.60 |
Add New Post /wp-admin/post-new.php | 7.84 ▲1.95 | 104.61 ▲2.79 |
Media Library /wp-admin/upload.php | 4.95 ▲1.72 | 47.30 ▲14.11 |
Five-Star Restaurant Menu - Welcome! /wp-admin/index.php?page=fdm-getting-started | 4.94 | 46.50 |
Dashboard /wp-admin/edit.php?post_type=fdm-menu&page=fdm-dashboard | 4.96 | 49.46 |
Menus /wp-admin/edit.php?post_type=fdm-menu | 5.03 | 54.81 |
Menu Sections /wp-admin/edit-tags.php?taxonomy=fdm-menu-section&post_type=fdm-menu-item | 4.97 | 50.89 |
Menu Items /wp-admin/edit.php?post_type=fdm-menu-item | 5.05 | 56.55 |
About Us /wp-admin/edit.php?post_type=fdm-menu&page=fdm-about-us | 4.95 | 48.70 |
Export /wp-admin/edit.php?post_type=fdm-menu&page=fdm-export | 4.95 | 47.27 |
Settings /wp-admin/edit.php?post_type=fdm-menu&page=food-and-drink-menu-settings | 4.96 | 46.98 |
Import /wp-admin/edit.php?post_type=fdm-menu&page=fdm-import | 4.95 | 64.15 |
Server storage [IO: ▲8.94MB] [DB: ▲0.01MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 1,134 new files
Database: no new tables, 11 new options
New WordPress options |
---|
food-and-drink-menu-settings |
widget_recent-posts |
widget_recent-comments |
can_compress_scripts |
db_upgraded |
widget_fdm_widget_menu |
fdm-installation-time |
widget_fdm_widget_menu_item |
theysaidso_admin_options |
widget_theysaidso_widget |
... |
Browser metrics Passed 4 tests
Five Star Restaurant Menu and Food Ordering: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,029 ▲282 | 14.39 ▲0.05 | 1.52 ▼0.16 | 37.33 ▼9.08 |
Dashboard /wp-admin | 2,425 ▲245 | 6.18 ▲0.58 | 119.09 ▲26.54 | 41.23 ▲0.38 |
Posts /wp-admin/edit.php | 2,356 ▲256 | 3.37 ▲1.38 | 49.95 ▲11.05 | 34.42 ▼0.81 |
Add New Post /wp-admin/post-new.php | 6,481 ▲4,955 | 28.73 ▲5.52 | 909.75 ▲180.61 | 38.75 ▼12.20 |
Media Library /wp-admin/upload.php | 1,487 ▲93 | 4.36 ▲0.16 | 95.02 ▼3.47 | 40.41 ▼0.26 |
Five-Star Restaurant Menu - Welcome! /wp-admin/index.php?page=fdm-getting-started | 1,279 | 3.09 | 43.22 | 33.88 |
Dashboard /wp-admin/edit.php?post_type=fdm-menu&page=fdm-dashboard | 1,497 | 3.65 | 50.29 | 109.79 |
Menus /wp-admin/edit.php?post_type=fdm-menu | 1,437 | 3.69 | 60.87 | 36.50 |
Menu Sections /wp-admin/edit-tags.php?taxonomy=fdm-menu-section&post_type=fdm-menu-item | 1,620 | 3.66 | 49.00 | 40.83 |
Menu Items /wp-admin/edit.php?post_type=fdm-menu-item | 1,457 | 3.86 | 53.69 | 37.09 |
About Us /wp-admin/edit.php?post_type=fdm-menu&page=fdm-about-us | 1,646 | 3.45 | 44.70 | 59.72 |
Export /wp-admin/edit.php?post_type=fdm-menu&page=fdm-export | 1,174 | 3.42 | 47.49 | 38.68 |
Settings /wp-admin/edit.php?post_type=fdm-menu&page=food-and-drink-menu-settings | 2,024 | 10.07 | 299.39 | 41.28 |
Import /wp-admin/edit.php?post_type=fdm-menu&page=fdm-import | 1,171 | 3.43 | 47.45 | 37.07 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- Zombie WordPress options were found after uninstall: 11 options
- widget_recent-comments
- widget_fdm_widget_menu
- widget_fdm_widget_menu_item
- fdm-permission-level
- fdm-installation-time
- widget_recent-posts
- widget_theysaidso_widget
- can_compress_scripts
- db_upgraded
- food-and-drink-menu-settings
- ...
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 0% 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
Almost there! Just fix the following items
- 3× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/food-and-drink-menu/fdm-templates/content/related_item_price.php
- > /wp-content/plugins/food-and-drink-menu/lib/stripe/build.php
- > /wp-content/plugins/food-and-drink-menu/lib/stripe/update_certs.php
- 568× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/food-and-drink-menu/fdm-templates/admin-order-form.php:3
- > PHP Fatal error
Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertBase' not found in wp-content/plugins/food-and-drink-menu/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ConvertDecimal.php:8
- > PHP Fatal error
Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/food-and-drink-menu/lib/stripe/lib/Invoice.php:110
- > PHP Fatal error
Uncaught Error: Class 'Stripe\\StripeObject' not found in wp-content/plugins/food-and-drink-menu/lib/stripe/lib/AttachedObject.php:12
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/food-and-drink-menu/lib/stripe/tests/TestCase.php:9
- > PHP Fatal error
Uncaught Error: Interface 'Stripe\\Exception\\ExceptionInterface' not found in wp-content/plugins/food-and-drink-menu/lib/stripe/lib/Exception/InvalidArgumentException.php:5
- > PHP Fatal error
Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\WriterPart' not found in wp-content/plugins/food-and-drink-menu/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Workbook.php:12
- > PHP Fatal error
Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Reader\\Ods\\BaseLoader' not found in wp-content/plugins/food-and-drink-menu/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Ods/DefinedNames.php:9
- > PHP Fatal error
Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/food-and-drink-menu/lib/stripe/lib/LineItem.php:21
- > PHP Fatal error
Trait 'PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/food-and-drink-menu/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php on line 10
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
- Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
food-and-drink-menu/food-and-drink-menu.php Passed 13 tests
The main PHP script in "Five Star Restaurant Menu and Food Ordering" version 2.4.12 is automatically included on every request by WordPress
140 characters long description:
Restaurant menu and food ordering system that is easy to set up and includes blocks, patterns and shortcodes for integration with any theme.
Code Analysis 0% from 3 tests
File types 0% from 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
Please make sure to remedy the following
- Do not include executable or dangerous files in your plugin
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
- ☣ wp-content/plugins/food-and-drink-menu/lib/stripe/data/ca-certificates.crt
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 899 | 22,631 | 51,533 | 97,876 |
CSS | 26 | 419 | 310 | 6,365 |
JavaScript | 82 | 1,144 | 572 | 4,536 |
Markdown | 12 | 610 | 0 | 2,149 |
JSON | 7 | 0 | 0 | 362 |
LESS | 6 | 54 | 39 | 330 |
YAML | 7 | 22 | 12 | 102 |
XML | 4 | 0 | 0 | 66 |
SVG | 1 | 0 | 0 | 44 |
Bourne Again Shell | 1 | 6 | 3 | 24 |
PHP code 0% from 2 tests
A short review of cyclomatic complexity and code structure
Please fix the following
- Class cyclomatic complexity should be reduced to less than 1000 (currently 1,020)
- Method cyclomatic complexity has to be reduced to less than 100 (currently 333)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.36 |
Average class complexity | 17.32 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 1,020.00 |
Average method complexity | 3.24 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 333.00 |
Code structure | ||
---|---|---|
Namespaces | 95 | |
Interfaces | 22 | |
Traits | 8 | |
Classes | 817 | |
▷ Abstract classes | 43 | 5.26% |
▷ Concrete classes | 774 | 94.74% |
▷ Final classes | 2 | 0.26% |
Methods | 6,191 | |
▷ Static methods | 1,790 | 28.91% |
▷ Public methods | 4,734 | 76.47% |
▷ Protected methods | 259 | 4.18% |
▷ Private methods | 1,198 | 19.35% |
Functions | 89 | |
▷ Named functions | 20 | 22.47% |
▷ Anonymous functions | 69 | 77.53% |
Constants | 2,125 | |
▷ Global constants | 16 | 0.75% |
▷ Class constants | 2,109 | 99.25% |
▷ Public constants | 1,942 | 92.08% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
36 PNG files occupy 1.72MB with 0.95MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
lib/simple-admin-pages/img/options-asset-star.png | 0.78KB | 0.32KB | ▼ 58.92% |
assets/img/options-asset-star.png | 0.78KB | 0.32KB | ▼ 58.92% |
lib/simple-admin-pages/img/options-asset-info.png | 0.84KB | 0.42KB | ▼ 49.53% |
lib/simple-admin-pages/img/options-asset-exclamation.png | 2.44KB | 1.39KB | ▼ 43.07% |
assets/img/icons/item-flags-64.png | 45.13KB | 16.40KB | ▼ 63.67% |