Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully
Server metrics [RAM: ▲0.14MB] [CPU: ▼142.17ms] Passed 4 tests
An overview of server-side resources used by My Restaurant Menu
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.93 ▲0.21 | 37.99 ▲15.87 |
Dashboard /wp-admin | 3.20 ▲0.14 | 56.82 ▲16.26 |
Posts /wp-admin/edit.php | 3.32 ▲0.21 | 48.57 ▲4.15 |
Add New Post /wp-admin/post-new.php | 5.52 ▲0.09 | 87.68 ▼586.96 |
Media Library /wp-admin/upload.php | 3.11 ▲0.10 | 31.51 ▼1.72 |
Menus /wp-admin/edit.php?post_type=mp62_mrm_menu | 3.19 | 35.21 |
Add New /wp-admin/post-new.php?post_type=mp62_mrm_item | 3.27 | 49.48 |
Settings /wp-admin/edit.php?post_type=mp62_mrm_item&page=my-restaurant-menu-settings | 3.08 | 28.92 |
Item need /wp-admin/edit-tags.php?taxonomy=mp62_mrm_item_need&post_type=mp62_mrm_item | 3.10 | 31.02 |
All items /wp-admin/edit.php?post_type=mp62_mrm_item | 3.19 | 38.78 |
Categories /wp-admin/edit-tags.php?taxonomy=mp62_mrm_item_section&post_type=mp62_mrm_item | 3.10 | 33.42 |
Server storage [IO: ▲2.28MB] [DB: ▲0.01MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 189 new files
Database: no new tables, 1 new option
New WordPress options |
---|
mp62_mrm_fonts_list |
Browser metrics Passed 4 tests
Checking browser requirements for My Restaurant Menu
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 4,013 ▲417 | 17.96 ▲1.99 | 8.84 ▼1.29 | 41.22 ▼6.78 |
Dashboard /wp-admin | 3,265 ▲334 | 8.39 ▲2.43 | 164.64 ▲19.34 | 112.07 ▼5.23 |
Posts /wp-admin/edit.php | 3,066 ▲327 | 3.96 ▲1.25 | 96.81 ▲33.06 | 87.67 ▼2.61 |
Add New Post /wp-admin/post-new.php | 1,691 ▲8 | 21.80 ▲3.03 | 265.33 ▼121.85 | 105.00 ▼4.01 |
Media Library /wp-admin/upload.php | 1,912 ▲102 | 4.99 ▼0.05 | 116.17 ▼26.31 | 120.30 ▲1.89 |
Menus /wp-admin/edit.php?post_type=mp62_mrm_menu | 1,723 | 4.40 | 83.56 | 73.68 |
Add New /wp-admin/post-new.php?post_type=mp62_mrm_item | 3,383 | 9.10 | 220.41 | 135.91 |
Settings /wp-admin/edit.php?post_type=mp62_mrm_item&page=my-restaurant-menu-settings | 1,549 | 4.00 | 80.46 | 83.55 |
Item need /wp-admin/edit-tags.php?taxonomy=mp62_mrm_item_need&post_type=mp62_mrm_item | 2,110 | 4.34 | 76.21 | 93.06 |
All items /wp-admin/edit.php?post_type=mp62_mrm_item | 1,720 | 4.37 | 83.18 | 72.62 |
Categories /wp-admin/edit-tags.php?taxonomy=mp62_mrm_item_section&post_type=mp62_mrm_item | 2,135 | 4.31 | 75.27 | 110.44 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 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
- mp62_mrm_fonts_list
Smoke tests 0% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
- > GET request to /wp-admin/edit.php?post_type=mp62_mrm_item&page=my-restaurant-menu-settings
- > User deprecated in wp-includes/functions.php+5221
screen_icon is deprecated since version 3.8.0 with no alternative available.
- > GET request to /wp-admin/edit.php?post_type=mp62_mrm_item&page=my-restaurant-menu-settings
- > User deprecated in wp-includes/functions.php+5221
get_screen_icon is deprecated since version 3.8.0 with no alternative available.
- 2 occurences, only the last one shown
- > GET request to /wp-admin/edit-tags.php?taxonomy=mp62_mrm_item_section&post_type=mp62_mrm_item
- > Notice in wp-content/plugins/my-restaurant-menu/includes/class-mp62-mrm-main.php+193
Trying to get property 'term_id' of non-object
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
- 4× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/my-restaurant-menu/templates/01menu-section.php
- > /wp-content/plugins/my-restaurant-menu/templates/01menu.php
- > /wp-content/plugins/my-restaurant-menu/dompdf/load_font.php
- > /wp-content/plugins/my-restaurant-menu/templates/01menu-item.php
- 191× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Font_Table' not found in wp-content/plugins/my-restaurant-menu/dompdf/lib/php-font-lib/classes/Font_Table_loca.php:14
- > PHP Warning
Use of undefined constant DOMPDF_DIR - assumed 'DOMPDF_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/my-restaurant-menu/dompdf/lib/fonts/dompdf_font_family_cache.dist.php on line 63
- > PHP Warning
Use of undefined constant DOMPDF_FONT_DIR - assumed 'DOMPDF_FONT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/my-restaurant-menu/dompdf/lib/fonts/dompdf_font_family_cache.php on line 67
- > PHP Warning
Use of undefined constant DOMPDF_DIR - assumed 'DOMPDF_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/my-restaurant-menu/dompdf/lib/fonts/dompdf_font_family_cache.dist.php on line 12
- > PHP Warning
Use of undefined constant DOMPDF_DIR - assumed 'DOMPDF_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/my-restaurant-menu/dompdf/lib/fonts/dompdf_font_family_cache.dist.php on line 33
- > PHP Fatal error
require_once(): Failed opening required 'DOMPDF_LIB_DIR/class.pdf.php' (include_path='.:/usr/share/php') in wp-content/plugins/my-restaurant-menu/dompdf/include/font_metrics.cls.php on line 11
- > PHP Warning
Use of undefined constant DOMPDF_DIR - assumed 'DOMPDF_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/my-restaurant-menu/dompdf/lib/fonts/dompdf_font_family_cache.dist.php on line 13
- > PHP Fatal error
Uncaught Error: Class 'Positioner' not found in wp-content/plugins/my-restaurant-menu/dompdf/include/absolute_positioner.cls.php:12
- > PHP Notice
Undefined variable: item in wp-content/plugins/my-restaurant-menu/templates/01menu-item.php on line 3
- > PHP Warning
Use of undefined constant DOMPDF_FONT_DIR - assumed 'DOMPDF_FONT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/my-restaurant-menu/dompdf/lib/fonts/dompdf_font_family_cache.php on line 75
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
- > GET request to /wp-admin/post-new.php?post_type=mp62_mrm_item
- > Network (severe)
var/www/wordpress/wp-content/plugins/my-restaurant-menu/css/my-restaurant-menu-fonts.css?wp-mce-49110-20201110 - 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
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: menu, food, drink, restaurant
my-restaurant-menu/index.php 92% from 13 tests
Analyzing the main PHP file in "My Restaurant Menu" version 0.2.0
Please take the time to fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("my-restaurant-menu.php" instead of "index.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin23,779 lines of code in 140 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 126 | 6,414 | 11,367 | 22,697 |
CSS | 5 | 88 | 51 | 606 |
JavaScript | 2 | 21 | 20 | 239 |
Markdown | 3 | 41 | 0 | 175 |
JSON | 2 | 0 | 0 | 39 |
HTML | 1 | 0 | 0 | 17 |
XML | 1 | 0 | 0 | 6 |
PHP code 50% from 2 tests
Analyzing cyclomatic complexity and code structure
Please fix the following
- Please reduce cyclomatic complexity of methods to less than 100 (currently 653)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.43 |
Average class complexity | 38.33 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 766.00 |
Average method complexity | 4.64 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 653.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 1 | |
Traits | 0 | |
Classes | 115 | |
▷ Abstract classes | 5 | 4.35% |
▷ Concrete classes | 110 | 95.65% |
▷ Final classes | 0 | 0.00% |
Methods | 1,229 | |
▷ Static methods | 123 | 10.01% |
▷ Public methods | 1,047 | 85.19% |
▷ Protected methods | 137 | 11.15% |
▷ Private methods | 45 | 3.66% |
Functions | 52 | |
▷ Named functions | 51 | 98.08% |
▷ Anonymous functions | 1 | 1.92% |
Constants | 157 | |
▷ Global constants | 15 | 9.55% |
▷ Class constants | 142 | 90.45% |
▷ Public constants | 142 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/no-image.png | 1.33KB | 0.65KB | ▼ 51.57% |
dompdf/lib/res/broken_image.png | 0.60KB | 0.47KB | ▼ 22.33% |