10% wp-review-restaurant

Code Review | WP Review Restaurant

WordPress plugin WP Review Restaurant scored 10% from 54 tests.

About plugin

  • Plugin page: wp-review-restaurant
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.6
  • WordPress version: 5.8.1
  • First release: Aug 20, 2014
  • Latest release: Jan 5, 2017
  • Number of updates: 23
  • Update frequency: every 38.4 days
  • Top authors: kishores (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active / 2,360 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/wp-review-restaurant/wp-review-restaurant.php+59
    Function create_function() is deprecated

Server metrics [RAM: ▼1.80MB] [CPU: ▼197.42ms] Passed 4 tests

Analyzing server-side resources used by WP Review Restaurant
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.80 ▼0.925.40 ▼18.42
Dashboard /wp-admin1.85 ▼1.215.43 ▼48.23
Posts /wp-admin/edit.php1.85 ▼1.266.47 ▼45.29
Add New Post /wp-admin/post-new.php1.85 ▼3.586.09 ▼665.43
Media Library /wp-admin/upload.php1.85 ▼1.155.53 ▼30.74
Add New /wp-admin/post-new.php?post_type=restaurant_listing1.856.35
Locations /wp-admin/edit-tags.php?taxonomy=restaurant_listing_type_location&post_type=restaurant_listing1.855.65
Additional Options /wp-admin/edit-tags.php?taxonomy=restaurant_listing_type_advanced&post_type=restaurant_listing1.857.10
Restaurant Types /wp-admin/edit-tags.php?taxonomy=restaurant_listing_type&post_type=restaurant_listing1.859.29
All Restaurant Listings /wp-admin/edit.php?post_type=restaurant_listing1.855.22
Cuisine Types /wp-admin/edit-tags.php?taxonomy=restaurant_listing_type_cuisine&post_type=restaurant_listing1.855.88
Settings /wp-admin/edit.php?post_type=restaurant_listing&page=review-restaurant-settings1.854.59

Server storage [IO: ▲0.76MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 156 new files
Database: no new tables, 24 new options
New WordPress options
restaurant_listing_type_children
review_restaurant_restaurant_type_6_color
review_restaurant_restaurant_type_4_color
review_restaurant_allowed_application_method
review_restaurant_submission_requires_approval
review_restaurant_user_requires_account
review_restaurant_registration_role
widget_widget_recent_restaurants
review_restaurant_restaurant_type_5_color
review_restaurant_hide_filled_positions
...

Browser metrics Passed 4 tests

WP Review Restaurant: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,773 ▲17715.88 ▲0.0111.76 ▲0.9653.73 ▼7.16
Dashboard /wp-admin3,032 ▲985.93 ▼0.07147.21 ▼22.51112.64 ▼10.05
Posts /wp-admin/edit.php2,801 ▲652.72 ▲0.0266.62 ▼5.00101.63 ▲5.94
Add New Post /wp-admin/post-new.php1,916 ▲23319.16 ▲0.39414.94 ▼7.02121.01 ▼11.68
Media Library /wp-admin/upload.php1,869 ▲625.02 ▼0.03170.50 ▲13.13124.13 ▼2.50
Add New /wp-admin/post-new.php?post_type=restaurant_listing4,6228.93263.04180.38
Locations /wp-admin/edit-tags.php?taxonomy=restaurant_listing_type_location&post_type=restaurant_listing2,1292.4272.2396.15
Additional Options /wp-admin/edit-tags.php?taxonomy=restaurant_listing_type_advanced&post_type=restaurant_listing2,4792.5367.02101.53
Restaurant Types /wp-admin/edit-tags.php?taxonomy=restaurant_listing_type&post_type=restaurant_listing2,1992.4071.66100.86
All Restaurant Listings /wp-admin/edit.php?post_type=restaurant_listing1,6142.7174.2190.23
Cuisine Types /wp-admin/edit-tags.php?taxonomy=restaurant_listing_type_cuisine&post_type=restaurant_listing2,1292.4271.9599.18
Settings /wp-admin/edit.php?post_type=restaurant_listing&page=review-restaurant-settings2,6603.27107.5369.80

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/wp-review-restaurant/wp-review-restaurant.php+59
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 24 options
    • wp_review_restaurant_version
    • review_restaurant_restaurant_type_what_color
    • review_restaurant_per_page
    • review_restaurant_registration_role
    • review_restaurant_installed_terms
    • review_restaurant_restaurant_type_6_color
    • review_restaurant_allowed_application_method
    • review_restaurant_restaurant_type_7_color
    • review_restaurant_restaurant_type_3_color
    • review_restaurant_hide_filled_positions
    • ...

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
These server-side errors were triggered
  • 16 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=restaurant_listing&page=review-restaurant-settings
    • > Deprecated in wp-content/plugins/wp-review-restaurant/wp-review-restaurant.php+66
    Function create_function() is deprecated

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 48× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wp-review-restaurant/trunk/templates/form-fields/file-field.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_restaurant_application_method() in wp-content/plugins/wp-review-restaurant/trunk/templates/restaurant-application.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/wp-review-restaurant/trunk/templates/restaurant-submitted.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wp-review-restaurant/trunk/templates/form-fields/text-field.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function restaurant_listing_class() in wp-content/plugins/wp-review-restaurant/trunk/templates/content-widget-restaurant_listing.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-review-restaurant/templates/restaurant-dashboard.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/wp-review-restaurant/templates/restaurant-submitted.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-review-restaurant/templates/restaurant-application-url.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-review-restaurant/templates/restaurant-application-email.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/wp-review-restaurant/templates/restaurant-filters.php:1

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/post-new.php?post_type=restaurant_listing
    • > Javascript (severe) in unknown
    /wp-admin/post-new.php?post_type=restaurant_listing 624:34 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: restaurant, restaurants, restaurant listing, restaurant board

wp-review-restaurant/wp-review-restaurant.php 92% from 13 tests

The principal PHP file in "WP Review Restaurant" v. 1.5 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected5,627 lines of code in 66 files:
LanguageFilesBlank linesComment linesLines of code
PHP449151,1453,845
LESS55071,181
JavaScript126146353
JSON100202
SVG10043
CSS3003

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity22.62
▷ Minimum class complexity3.00
▷ Maximum class complexity85.00
Average method complexity4.13
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes42
▷ Abstract classes24.76%
▷ Concrete classes4095.24%
▷ Final classes00.00%
Methods290
▷ Static methods8830.34%
▷ Public methods25487.59%
▷ Protected methods227.59%
▷ Private methods144.83%
Functions80
▷ Named functions80100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.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.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
trunk/assets/images/restaurant.png8.09KB1.75KB▼ 78.35%
assets/images/restaurant.png8.09KB1.75KB▼ 78.35%