67% restropress

Code Review | RestroPress - Online Food Ordering System

WordPress plugin RestroPress - Online Food Ordering System scored67%from 54 tests.

About plugin

  • Plugin page: restropress
  • Plugin version: 2.9.8
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.4.1
  • WordPress version: 6.3.1
  • First release: Sep 10, 2018
  • Latest release: Nov 17, 2023
  • Number of updates: 130
  • Update frequency: every 14.6 days
  • Top authors: Magnigenie (59.23%)sagarseth9 (26.92%)kshirod patel (15.38%)

Code review

54 tests

User reviews

96 reviews

Install metrics

2,000+ active /104,702 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲1.10MB] [CPU: ▲4.74ms] Passed 4 tests

Server-side resources used by RestroPress - Online Food Ordering System
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.29 ▲0.8341.80 ▲1.26
Dashboard /wp-admin4.55 ▲1.2182.52 ▲19.36
Posts /wp-admin/edit.php4.61 ▲1.2558.13 ▲15.90
Add New Post /wp-admin/post-new.php7.05 ▲1.1786.20 ▼5.93
Media Library /wp-admin/upload.php4.44 ▲1.2140.91 ▲7.74
Extensions /wp-admin/admin.php?page=rpress-extensions4.8746.77
All Food Items /wp-admin/edit.php?post_type=fooditem4.5860.02
Tools /wp-admin/admin.php?page=rpress-tools4.4540.40
Settings /wp-admin/admin.php?page=rpress-settings4.5958.76
Categories /wp-admin/edit-tags.php?taxonomy=food-category&post_type=fooditem4.5147.80
Orders /wp-admin/admin.php?page=rpress-payment-history5.0749.58
Discount Codes /wp-admin/admin.php?page=rpress-discounts4.5645.02
Addons /wp-admin/edit-tags.php?taxonomy=addon_category&post_type=fooditem4.4846.06
Reports /wp-admin/admin.php?page=rpress-reports4.4345.27
Customers /wp-admin/admin.php?page=rpress-customers4.4643.86

Server storage [IO: ▲7.39MB] [DB: ▲0.11MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 394 new files
Database: 2 new tables, 13 new options
New tables
wp_rpress_customermeta
wp_rpress_customers
New WordPress options
_rpress_table_check
widget_recent-posts
wp_rpress_customermeta_db_version
can_compress_scripts
rpress_version
theysaidso_admin_options
rpress_settings
rpress_use_php_sessions
wp_rpress_customers_db_version
widget_recent-comments
...

Browser metrics Passed 4 tests

A check of browser resources used by RestroPress - Online Food Ordering System
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,670 ▲88316.25 ▲1.966.90 ▲4.9137.14 ▼6.95
Dashboard /wp-admin2,886 ▲7157.53 ▲1.90152.54 ▲57.5072.54 ▲26.35
Posts /wp-admin/edit.php2,617 ▲5174.07 ▲2.1369.20 ▲34.4136.64 ▼3.02
Add New Post /wp-admin/post-new.php1,691 ▲16522.92 ▼0.38754.20 ▲97.8636.89 ▼10.82
Media Library /wp-admin/upload.php1,833 ▲4365.52 ▲1.33100.50 ▲1.6140.32 ▼4.26
Extensions /wp-admin/admin.php?page=rpress-extensions3,6194.0876.19105.57
All Food Items /wp-admin/edit.php?post_type=fooditem1,6764.1471.1729.51
Tools /wp-admin/admin.php?page=rpress-tools1,5064.2065.4227.37
Settings /wp-admin/admin.php?page=rpress-settings3,3584.5980.8638.08
Categories /wp-admin/edit-tags.php?taxonomy=food-category&post_type=fooditem1,8274.2163.6230.69
Orders /wp-admin/admin.php?page=rpress-payment-history1,7124.0366.8624.42
Discount Codes /wp-admin/admin.php?page=rpress-discounts1,5834.0159.4432.12
Addons /wp-admin/edit-tags.php?taxonomy=addon_category&post_type=fooditem1,8084.1161.9229.37
Reports /wp-admin/admin.php?page=rpress-reports2,2954.4578.3333.31
Customers /wp-admin/admin.php?page=rpress-customers1,5454.1457.8927.29

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie tables detected upon uninstall: 2 tables
    • wp_rpress_customers
    • wp_rpress_customermeta
  • This plugin did not uninstall successfully, leaving 13 options in the database
    • rpress_earnings_total
    • rpress_settings
    • widget_recent-comments
    • rpress_version
    • can_compress_scripts
    • wp_rpress_customermeta_db_version
    • db_upgraded
    • theysaidso_admin_options
    • rpress_use_php_sessions
    • widget_recent-posts
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/restropress/templates/rpress-popup.php
  • 33× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/restropress/templates/shortcode-register.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post() in wp-content/plugins/restropress/templates/rpress-show-order-details.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/restropress/includes/emails/email-tags.php:121
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/restropress/templates/rpress-edit-product.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_term_by() in wp-content/plugins/restropress/templates/fooditem/category.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/restropress/templates/email-foodlist.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/restropress/templates/account-pending.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/restropress/templates/payment-processing.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/restropress/templates/checkout_cart.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function absint() in wp-content/plugins/restropress/templates/receipt/print-receipt-content.php:3

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 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #1, #10, #11, #12, #13, #14, #15, #16, #17, #2, #3, #4, #5, #6, #7, #8, #9 in restropress/assets to your readme.txt
The official readme.txt might help

restropress/restro-press.php 77% from 13 tests

The primary PHP file in "RestroPress - Online Food Ordering System" version 2.9.8 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("restropress.php" instead of "restro-press.php")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")
  • Domain Path: Please prefix the domain path with a forward slash character ("/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
No dangerous file extensions were detected90,127 lines of code in 298 files:
LanguageFilesBlank linesComment linesLines of code
PHP21414,85822,69448,688
JavaScript442,5051,04019,559
CSS221,27553516,164
PO File11,7312,2995,425
SVG1603290
JSON1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
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 complexity44.57
▷ Minimum class complexity1.00
▷ Maximum class complexity306.00
Average method complexity4.33
▷ Minimum method complexity1.00
▷ Maximum method complexity90.00
Code structure
Namespaces1
Interfaces4
Traits0
Classes92
▷ Abstract classes11.09%
▷ Concrete classes9198.91%
▷ Final classes33.30%
Methods1,304
▷ Static methods977.44%
▷ Public methods1,03078.99%
▷ Protected methods503.83%
▷ Private methods22417.18%
Functions974
▷ Named functions974100.00%
▷ Anonymous functions00.00%
Constants19
▷ Global constants1263.16%
▷ Class constants736.84%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
43 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/non_veg.png3.62KB1.28KB▼ 64.79%
assets/images/checkbox.png0.26KB0.20KB▼ 22.85%
assets/images/tick-order.png1.99KB1.24KB▼ 37.71%
assets/css/chosen-sprite.png0.53KB0.88KB0.00%
assets/images/icons/mastercard.png1.22KB1.24KB0.00%