Benchmarks
Plugin footprint 23% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
- Install procedure validation failed for this plugin
- > Warning in wp-content/plugins/wp-restaurant-listings/includes/admin/class-wp-restaurant-listings-writepanels.php+724
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
Server metrics [RAM: ▼1.50MB] [CPU: ▼347.40ms] Passed 4 tests
Analyzing server-side resources used by WP Restaurant Listings
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.56 ▲1.04 | 64.07 ▲16.38 |
Dashboard /wp-admin | 2.82 ▼0.58 | 7.32 ▼27.73 |
Posts /wp-admin/edit.php | 2.82 ▼0.81 | 7.70 ▼30.07 |
Add New Post /wp-admin/post-new.php | 2.82 ▼4.15 | 7.16 ▼1,315.15 |
Media Library /wp-admin/upload.php | 2.82 ▼0.47 | 7.56 ▼16.63 |
Setup /wp-admin/index.php?page=restaurant-listings-setup | 2.83 | 8.24 |
Settings /wp-admin/edit.php?post_type=restaurant_listings&page=restaurant-listings-settings | 2.83 | 7.60 |
Add New /wp-admin/post-new.php?post_type=restaurant_listings | 2.83 | 9.07 |
All Restaurants /wp-admin/edit.php?post_type=restaurant_listings | 2.83 | 6.94 |
Server storage [IO: ▲1.30MB] [DB: ▲0.01MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 171 new files
Database: 1 new table, 27 new options
New tables |
---|
wp_restaurants_location |
New WordPress options |
---|
restaurant_listings_date_format |
restaurant_listings_generate_username_from_email |
restaurant_listings_registration_role |
restaurant_listings_per_page |
restaurant_listings_multi_restaurant_type |
restaurant_listings_user_can_edit_pending_submissions |
restaurant_listings_currency |
widget_widget_recent_restaurants |
widget_widget_featured_restaurants |
restaurant_listings_restaurants_locator_page_id |
... |
Browser metrics Passed 4 tests
An overview of browser requirements for WP Restaurant Listings
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,962 ▲208 | 16.71 ▲1.07 | 9.40 ▲3.44 | 2.71 ▲0.05 |
Dashboard /wp-admin | 2,941 ▲80 | 6.13 ▼0.06 | 119.27 ▼13.67 | 216.21 ▲49.95 |
Posts /wp-admin/edit.php | 2,732 ▲41 | 3.24 ▲0.02 | 72.65 ▲7.57 | 201.32 ▲50.37 |
Add New Post /wp-admin/post-new.php | 1,692 ▲31 | 16.41 ▼0.28 | 424.36 ▲11.66 | 158.70 ▼16.43 |
Media Library /wp-admin/upload.php | 1,747 ▲49 | 5.54 ▲0.05 | 148.60 ▲14.36 | 196.30 ▲11.06 |
Setup /wp-admin/index.php?page=restaurant-listings-setup | 1,080 | 2.36 | 55.89 | 177.66 |
Settings /wp-admin/edit.php?post_type=restaurant_listings&page=restaurant-listings-settings | 1,525 | 2.82 | 84.64 | 101.53 |
Add New /wp-admin/post-new.php?post_type=restaurant_listings | 4,011 | 9.86 | 233.34 | 239.21 |
All Restaurants /wp-admin/edit.php?post_type=restaurant_listings | 1,546 | 3.28 | 65.36 | 112.87 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 25% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
- Uninstall procedure validation failed for this plugin
- > Warning in wp-content/plugins/wp-restaurant-listings/includes/admin/class-wp-restaurant-listings-writepanels.php+724
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
- This plugin does not fully uninstall, leaving 1 table in the database
- wp_restaurants_location
- This plugin did not uninstall successfully, leaving 13 options in the database
- restaurant_listings_currency
- widget_widget_restaurant_hours
- restaurant_listings_use_standard_password_setup_email
- restaurant_listings_multi_restaurant_type
- restaurant_listings_search_radius
- widget_widget_featured_restaurants
- restaurant_listings_restaurants_locator_page_id
- restaurant_listings_enable_types
- restaurant_listings_mapbox_access_token
- restaurant_listings_generate_username_from_email
- ...
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
- 5 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=restaurant_listings
- > POST request to /wp-admin/admin-ajax.php
- > Warning in wp-content/plugins/wp-restaurant-listings/includes/admin/class-wp-restaurant-listings-writepanels.php+724
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
SRP 50% 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
Please fix the following items
- 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Class 'WP_Restaurant_Listings_Form' not found in wp-content/plugins/wp-restaurant-listings/includes/forms/class-wp-restaurant-listings-form-submit-restaurant.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-restaurant-listings/includes/3rd-party/polylang.php:16
- > PHP Warning
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/wp-restaurant-listings/includes/admin/class-wp-restaurant-listings-writepanels.php on line 724
- > PHP Fatal error
require_once(): Failed opening required 'RESTAURANT_LISTING_PLUGIN_DIR/includes/3rd-party/wpml.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-restaurant-listings/includes/3rd-party/3rd-party.php on line 5
- > PHP Warning
Use of undefined constant RESTAURANT_LISTING_PLUGIN_DIR - assumed 'RESTAURANT_LISTING_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-restaurant-listings/includes/3rd-party/3rd-party.php on line 5
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-restaurant-listings/includes/3rd-party/wpml.php:16
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-restaurant-listings/wp-restaurant-listings-template.php:105
- > PHP Warning
require_once(RESTAURANT_LISTING_PLUGIN_DIR/includes/3rd-party/wpml.php): failed to open stream: No such file or directory in wp-content/plugins/wp-restaurant-listings/includes/3rd-party/3rd-party.php on line 5
- > PHP Fatal error
Uncaught Error: Class 'WP_Restaurant_Listings_Form' not found in wp-content/plugins/wp-restaurant-listings/includes/forms/class-wp-restaurant-listings-form-submit-restaurant.php:10
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
- 2 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=restaurant_listings
- > 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: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wp-restaurant-listings/assets/js/admin.js?ver=1.0.2:287:83)\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
- 2 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=restaurant_listings
- > 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: $(...).live is not a function
- > GET request to /wp-admin/post-new.php?post_type=restaurant_listings
- > Console-api (warning) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.9.2 1:31592 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wp-restaurant-listings/assets/js/admin.js?ver=1.0.2:287:83)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&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,moxiejs,plupload&ver=5.9.2:2:30340)" undefined
- > GET request to /wp-admin/post-new.php?post_type=restaurant_listings
- > Javascript (severe) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=5.9.2 1:31702 Uncaught TypeError: $(...).live is not a function
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
- Screenshots: Please a description for screenshot #7 in wp-restaurant-listings/assets to your readme.txt
wp-restaurant-listings/wp-restaurant-listings.php Passed 13 tests
"WP Restaurant Listings" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
117 characters long description:
Manage restaurant listings from the WordPress admin panel, and allow users to post restaurants directly to your site.
Code Analysis Passed 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
Success! There were no dangerous files found in this plugin18,160 lines of code in 148 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 82 | 1,733 | 3,330 | 7,410 |
JavaScript | 32 | 1,403 | 1,012 | 6,981 |
LESS | 8 | 233 | 64 | 2,595 |
CSS | 12 | 108 | 95 | 599 |
JSON | 3 | 0 | 0 | 345 |
SVG | 4 | 50 | 0 | 94 |
Markdown | 1 | 37 | 0 | 82 |
HTML | 4 | 0 | 0 | 45 |
XML | 2 | 5 | 4 | 9 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.44 |
Average class complexity | 28.97 |
▷ Minimum class complexity | 5.00 |
▷ Maximum class complexity | 151.00 |
Average method complexity | 4.27 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 37.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 29 | |
▷ Abstract classes | 2 | 6.90% |
▷ Concrete classes | 27 | 93.10% |
▷ Final classes | 0 | 0.00% |
Methods | 248 | |
▷ Static methods | 64 | 25.81% |
▷ Public methods | 217 | 87.50% |
▷ Protected methods | 19 | 7.66% |
▷ Private methods | 12 | 4.84% |
Functions | 106 | |
▷ Named functions | 106 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 7 | |
▷ Global constants | 6 | 85.71% |
▷ Class constants | 1 | 14.29% |
▷ Public constants | 1 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/chosen-sprite.png | 0.63KB | 0.88KB | 0.00% |
assets/images/marker.png | 1.54KB | 0.91KB | ▼ 40.60% |
assets/css/photoswipe/default-skin/default-skin.png | 0.53KB | 0.72KB | 0.00% |
assets/images/restaurant.png | 17.50KB | 6.31KB | ▼ 63.93% |
assets/images/chosen-sprite@2x.png | 0.85KB | 0.83KB | ▼ 3.10% |