Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully
Server metrics [RAM: ▲1.60MB] [CPU: ▼136.61ms] 75% from 4 tests
Server-side resources used by RestaurantPress
It is recommended to improve the following
- CPU: Try to keep total CPU usage under 500.00ms (currently 4,678.22ms on /wp-admin/admin.php?page=rp-extensions)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.23 ▲1.39 | 48.86 ▲13.20 |
Dashboard /wp-admin | 4.71 ▲1.65 | 47.48 ▼0.18 |
Posts /wp-admin/edit.php | 4.82 ▲1.71 | 56.89 ▲11.90 |
Add New Post /wp-admin/post-new.php | 7.47 ▲2.04 | 94.29 ▼566.67 |
Media Library /wp-admin/upload.php | 4.66 ▲1.66 | 41.83 ▲8.53 |
Extensions /wp-admin/admin.php?page=rp-extensions | 4.63 | 4,678.22 |
Add Menu Item /wp-admin/post-new.php?post_type=food_menu | 4.99 | 66.69 |
Categories /wp-admin/edit-tags.php?taxonomy=food_menu_cat&post_type=food_menu | 4.72 | 46.17 |
Settings /wp-admin/admin.php?page=rp-settings | 4.76 | 51.30 |
RestaurantPress /wp-admin/admin.php?page=restaurantpress | 4.47 | 35.61 |
Tags /wp-admin/edit-tags.php?taxonomy=food_menu_tag&post_type=food_menu | 4.64 | 41.59 |
All Menu Items /wp-admin/edit.php?post_type=food_menu | 4.88 | 46.22 |
Groups /wp-admin/edit.php?post_type=food_group | 4.73 | 62.43 |
Server storage [IO: ▲2.21MB] [DB: ▲0.01MB] Passed 3 tests
Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 217 new files
Database: 1 new table, 13 new options
New tables |
---|
wp_rp_sessions |
New WordPress options |
---|
restaurantpress_currency_pos |
restaurantpress_version |
restaurantpress_db_version |
restaurantpress_enable_gallery_zoom |
widget_restaurantpress_widget_menu |
restaurantpress_meta_box_errors |
restaurantpress_admin_notices |
restaurantpress_price_decimal_sep |
restaurantpress_price_num_decimals |
current_theme_supports_restaurantpress |
... |
Browser metrics Passed 4 tests
A check of browser resources used by RestaurantPress
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,942 ▲346 | 16.43 ▲0.44 | 12.80 ▲2.49 | 44.10 ▼3.91 |
Dashboard /wp-admin | 3,059 ▲128 | 6.08 ▲0.15 | 143.96 ▼51.11 | 106.77 ▼5.19 |
Posts /wp-admin/edit.php | 2,831 ▲92 | 2.72 ▲0.01 | 65.76 ▼1.26 | 91.53 ▼4.25 |
Add New Post /wp-admin/post-new.php | 1,741 ▲58 | 19.00 ▲0.46 | 441.95 ▲42.46 | 104.80 ▼0.04 |
Media Library /wp-admin/upload.php | 1,899 ▲92 | 5.01 ▼0.02 | 159.86 ▼14.07 | 114.07 ▲5.92 |
Extensions /wp-admin/admin.php?page=rp-extensions | 1,282 | 3.00 | 81.66 | 79.53 |
Add Menu Item /wp-admin/post-new.php?post_type=food_menu | 4,301 | 11.70 | 305.00 | 158.58 |
Categories /wp-admin/edit-tags.php?taxonomy=food_menu_cat&post_type=food_menu | 2,208 | 4.38 | 95.14 | 95.03 |
Settings /wp-admin/admin.php?page=rp-settings | 2,418 | 3.20 | 94.00 | 80.77 |
RestaurantPress /wp-admin/admin.php?page=restaurantpress | 28 | 0.90 | 0.10 | 9.83 |
Tags /wp-admin/edit-tags.php?taxonomy=food_menu_tag&post_type=food_menu | 1,803 | 2.39 | 63.41 | 84.65 |
All Menu Items /wp-admin/edit.php?post_type=food_menu | 1,814 | 4.66 | 111.50 | 84.06 |
Groups /wp-admin/edit.php?post_type=food_group | 1,563 | 3.03 | 84.14 | 112.18 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
- This plugin does not fully uninstall, leaving 1 table in the database
- wp_rp_sessions
- This plugin does not fully uninstall, leaving 13 options in the database
- restaurantpress_price_thousand_sep
- restaurantpress_queue_flush_rewrite_rules
- current_theme_supports_restaurantpress
- restaurantpress_enable_gallery_zoom
- restaurantpress_price_decimal_sep
- restaurantpress_admin_notices
- restaurantpress_price_num_decimals
- widget_restaurantpress_widget_menu
- restaurantpress_version
- restaurantpress_currency
- ...
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
- > GET request to /wp-admin/admin.php?page=restaurantpress
- > Network (severe)
wp-admin/admin.php?page=restaurantpress - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
Optimizations
Plugin configuration Passed 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
7 plugin tags: drink, cafe, food, menu, restaurant...
restaurantpress/restaurantpress.php Passed 13 tests
The principal PHP file in "RestaurantPress" v. 1.8.1 is loaded by WordPress automatically on each request
101 characters long description:
Allows you to create awesome restaurant menus for restaurants, bars, and cafes in no time. Smartly :)
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected33,950 lines of code in 201 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 45 | 3,992 | 1,786 | 16,464 |
PHP | 123 | 3,106 | 6,433 | 13,228 |
Sass | 13 | 639 | 2 | 3,714 |
CSS | 17 | 94 | 87 | 497 |
SVG | 3 | 0 | 1 | 47 |
PHP code 50% from 2 tests
This is a very shot review of cyclomatic complexity and code structure
It is recommended to fix the following
- Please reduce cyclomatic complexity of methods to less than 100 (currently 105)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.43 |
Average class complexity | 24.85 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 474.00 |
Average method complexity | 3.35 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 105.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 71 | |
▷ Abstract classes | 10 | 14.08% |
▷ Concrete classes | 61 | 85.92% |
▷ Final classes | 1 | 1.64% |
Methods | 725 | |
▷ Static methods | 159 | 21.93% |
▷ Public methods | 422 | 58.21% |
▷ Protected methods | 250 | 34.48% |
▷ Private methods | 53 | 7.31% |
Functions | 166 | |
▷ Named functions | 166 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 12 | |
▷ Global constants | 10 | 83.33% |
▷ Class constants | 2 | 16.67% |
▷ Public constants | 2 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.03MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/select2x2.png | 0.83KB | 0.77KB | ▼ 6.15% |
assets/images/placeholder.png | 24.75KB | 10.16KB | ▼ 58.94% |
assets/css/photoswipe/default-skin/default-skin.png | 0.53KB | 0.72KB | 0.00% |
assets/images/select2.png | 0.60KB | 0.99KB | 0.00% |