77% restaurant-menu-using-woocommerce

Code Review | Restaurant Menu / bulk order plugin for WooCommerce

WordPress plugin Restaurant Menu / bulk order plugin for WooCommerce scored77%from 54 tests.

About plugin

  • Plugin page: restaurant-menu-u...
  • Plugin version: 6.2.24
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.4.0
  • WordPress version: 6.3.1
  • First release: Aug 10, 2018
  • Latest release: Nov 28, 2023
  • Number of updates: 264
  • Update frequency: every 7.4 days
  • Top authors: rajeshsingh520 (100%)

Code review

54 tests

User reviews

55 reviews

Install metrics

40+ active /29,771 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.05ms] Passed 4 tests

A check of server-side resources used by Restaurant Menu / bulk order plugin for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0134.28 ▼5.82
Dashboard /wp-admin3.32 ▲0.0151.43 ▲4.98
Posts /wp-admin/edit.php3.37 ▲0.0147.55 ▼2.43
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.60 ▼4.73
Media Library /wp-admin/upload.php3.24 ▲0.0135.37 ▲4.78

Server storage [IO: ▲0.80MB] [DB: ▲0.00MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 67 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Restaurant Menu / bulk order plugin for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲5914.67 ▲0.431.94 ▲0.1336.40 ▼8.18
Dashboard /wp-admin2,204 ▲245.60 ▼0.1395.86 ▼4.3744.29 ▲1.42
Posts /wp-admin/edit.php2,107 ▲71.96 ▲0.0140.64 ▲1.7836.19 ▲0.10
Add New Post /wp-admin/post-new.php1,532 ▲624.04 ▲1.19656.37 ▲62.3548.17 ▼16.20
Media Library /wp-admin/upload.php1,403 ▲34.14 ▼0.0496.80 ▼1.1142.14 ▼1.03

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 13× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/restaurant-menu-using-woocommerce/include/pisol.class.form.php
    • > /wp-content/plugins/restaurant-menu-using-woocommerce/include/pisol_categories.php
    • > /wp-content/plugins/restaurant-menu-using-woocommerce/front/view/product.php
    • > /wp-content/plugins/restaurant-menu-using-woocommerce/pisol_restaurant_menu.php
    • > /wp-content/plugins/restaurant-menu-using-woocommerce/front/view/child-cat-product-loop.php
    • > /wp-content/plugins/restaurant-menu-using-woocommerce/front/view/button.php
    • > /wp-content/plugins/restaurant-menu-using-woocommerce/include/pisol_products.php
    • > /wp-content/plugins/restaurant-menu-using-woocommerce/single-product/product-sidedish-group.php
    • > /wp-content/plugins/restaurant-menu-using-woocommerce/admin/pisol_admin.php
    • > /wp-content/plugins/restaurant-menu-using-woocommerce/front/pisol_front.php
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant PISOL_RM_FREE_VERSION - assumed 'PISOL_RM_FREE_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/restaurant-menu-using-woocommerce/admin/pisol_restaurant_menu_design.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/restaurant-menu-using-woocommerce/sidedish/class-side-dish.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/restaurant-menu-using-woocommerce/include/banner-sample.php:63
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/restaurant-menu-using-woocommerce/front/pisol-design.php:106
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/restaurant-menu-using-woocommerce/single-product/single-product-page.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/restaurant-menu-using-woocommerce/admin/pisol_restaurant_menu_design.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/restaurant-menu-using-woocommerce/admin/pisol_restaurant_menu_food_type.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/restaurant-menu-using-woocommerce/sidedish/class-side-dish-integrator.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/restaurant-menu-using-woocommerce/admin/pisol_restaurant_menu_speed.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: These screenshots need descriptions #1, #10, #11, #12, #13, #14, #15, #16, #2, #3, #4, #5, #6, #7 in restaurant-menu-using-woocommerce/assets to your readme.txt
Please take inspiration from this readme.txt

restaurant-menu-using-woocommerce/pisol_restaurant_menu.php 85% from 13 tests

Analyzing the main PHP file in "Restaurant Menu / bulk order plugin for WooCommerce" version 6.2.24
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("restaurant-menu-using-woocommerce.php" instead of "pisol_restaurant_menu.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected16,243 lines of code in 59 files:
LanguageFilesBlank linesComment linesLines of code
CSS82,2472710,475
PHP308603793,291
JavaScript92602261,250
SVG10251,016
PO File26674211

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity23.00
▷ Minimum class complexity1.00
▷ Maximum class complexity115.00
Average method complexity3.54
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods148
▷ Static methods1610.81%
▷ Public methods148100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions770.00%
▷ Anonymous functions330.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
include/background.png74.27KB26.29KB▼ 64.60%