84% orderable

Code Review | Online Ordering System For Restaurants & Local Retail by Orderable

WordPress plugin Online Ordering System For Restaurants & Local Retail by Orderable scored84%from 54 tests.

About plugin

  • Plugin page: orderable
  • Plugin version: 1.10.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.0-6.4
  • WordPress version: 6.3.1
  • First release: Jun 16, 2021
  • Latest release: Nov 15, 2023
  • Number of updates: 28
  • Update frequency: every 31.5 days
  • Top authors: orderable (100%)

Code review

54 tests

User reviews

29 reviews

Install metrics

3,000+ active /42,755 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.41ms] Passed 4 tests

A check of server-side resources used by Online Ordering System For Restaurants & Local Retail by Orderable
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0539.58 ▼0.35
Dashboard /wp-admin3.34 ▲0.0444.37 ▼7.81
Posts /wp-admin/edit.php3.40 ▲0.0445.29 ▼3.54
Add New Post /wp-admin/post-new.php5.93 ▲0.0487.08 ▲3.57
Media Library /wp-admin/upload.php3.27 ▲0.0435.08 ▲2.08

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 205 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Online Ordering System For Restaurants & Local Retail by Orderable
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲3414.23 ▼0.111.82 ▼0.1840.57 ▼3.52
Dashboard /wp-admin2,204 ▲275.62 ▲0.0291.50 ▼3.1242.83 ▲0.03
Posts /wp-admin/edit.php2,107 ▲72.01 ▲0.0439.58 ▲0.3737.56 ▲1.12
Add New Post /wp-admin/post-new.php1,532 ▲623.11 ▲0.21607.61 ▼62.4352.90 ▼8.90
Media Library /wp-admin/upload.php1,409 ▲64.14 ▼0.0396.10 ▼9.7941.87 ▼1.15

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% 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 50% from 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
Almost there! Just fix the following items
  • 20× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/orderable/inc/modules/location/templates/zones/delivery-zones-modal-add-update.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/orderable/templates/admin/orderable-pro-page.php:1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/orderable/inc/modules/location/templates/zones/time-slot-delivery-zone.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/orderable/inc/modules/layouts/templates/admin/layout-settings-metabox.php:7
    • > PHP Notice
      Undefined variable: zone in wp-content/plugins/orderable/inc/modules/location/templates/zones/time-slot-delivery-zone.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_json_encode() in wp-content/plugins/orderable/inc/modules/location/templates/zones/time-slot-delivery-zone.php:23
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/orderable/inc/modules/location/templates/zones/time-slot-no-delivery-zones.php on line 9
    • > PHP Notice
      Undefined variable: time_slot_id in wp-content/plugins/orderable/inc/modules/location/templates/zones/time-slot-delivery-zone.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/orderable/inc/modules/location/templates/zones/time-slot-delivery-zone-actions.php:16
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/orderable/inc/modules/location/templates/zones/time-slot-delivery-zone.php on line 20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: local ordering, ecommerce, woocommerce, restaurants

orderable/orderable.php 92% from 13 tests

"Online Ordering System For Restaurants & Local Retail by Orderable" version 1.10.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.4" instead of "5.4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin35,623 lines of code in 157 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript242,7881,91212,268
PHP772,4404,35010,332
CSS261,2443618,207
JSON2002,304
PO File37708811,919
Sass1811426540
SVG60035
XML15418

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity23.19
▷ Minimum class complexity1.00
▷ Maximum class complexity160.00
Average method complexity3.31
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes53
▷ Abstract classes00.00%
▷ Concrete classes53100.00%
▷ Final classes00.00%
Methods485
▷ Static methods39381.03%
▷ Public methods44992.58%
▷ Protected methods255.15%
▷ Private methods112.27%
Functions13
▷ Named functions323.08%
▷ Anonymous functions1076.92%
Constants14
▷ Global constants14100.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
32 PNG files occupy 0.19MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/vendor/wp-settings-framework/assets/vendor/jquery-ui/images/ui-bg_inset-soft_30_f58400_1x100.png0.11KB0.18KB0.00%
assets/img/upgrade-to-pro/star.png1.10KB0.59KB▼ 46.15%
assets/img/upgrade-to-pro/header-blop.png5.54KB2.29KB▼ 58.63%
assets/img/upgrade-to-pro/header-delivery.png88.00KB32.21KB▼ 63.39%
inc/vendor/wp-settings-framework/assets/vendor/jquery-ui/images/ui-icons_ffffff_256x240.png4.27KB4.11KB▼ 3.78%