78% flipdish-ordering-system

Code Review | Flipdish Ordering System

WordPress plugin Flipdish Ordering System scored78%from 54 tests.

About plugin

  • Plugin page: flipdish-ordering...
  • Plugin version: 1.4.16
  • PHP compatiblity: 5.6.39+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9
  • WordPress version: 6.3.1
  • First release: Jun 17, 2020
  • Latest release: Apr 7, 2022
  • Number of updates: 68
  • Update frequency: every 9.7 days
  • Top authors: flipdish (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

700+ active /8,411 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼5.62ms] Passed 4 tests

An overview of server-side resources used by Flipdish Ordering System
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.81 ▼3.62
Dashboard /wp-admin3.41 ▲0.0649.32 ▼15.58
Posts /wp-admin/edit.php3.52 ▲0.1648.79 ▼0.36
Add New Post /wp-admin/post-new.php5.99 ▲0.10103.92 ▲7.34
Media Library /wp-admin/upload.php3.33 ▲0.1036.63 ▼2.90
Flipdish /wp-admin/admin.php?page=flipdish-ordering3.3132.60
Preview /wp-admin/admin.php?page=Preview3.3032.66
System Info /wp-admin/admin.php?page=flipdish-system-info3.3535.43

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 43 new files
Database: no new tables, 8 new options
New WordPress options
flipdish_ordering_options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
FLIPDISH_ORDERING_VERSION
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Flipdish Ordering System
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8814.45 ▲0.081.70 ▼0.1536.66 ▼7.71
Dashboard /wp-admin2,235 ▲504.88 ▼0.9795.10 ▼22.8963.82 ▲20.90
Posts /wp-admin/edit.php2,118 ▲291.98 ▼0.0337.61 ▲1.1534.61 ▲0.63
Add New Post /wp-admin/post-new.php1,536 ▲317.57 ▼5.65641.89 ▼31.5854.32 ▲1.49
Media Library /wp-admin/upload.php1,405 ▲174.23 ▲0.00109.27 ▲14.2075.05 ▲29.68
Flipdish /wp-admin/admin.php?page=flipdish-ordering9762.0824.9532.41
Preview /wp-admin/admin.php?page=Preview8062.0223.6625.75
System Info /wp-admin/admin.php?page=flipdish-system-info1,3422.0624.5628.32

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/flipdish-ordering-system/includes/banners/ct-de.php
    • > /wp-content/plugins/flipdish-ordering-system/includes/flipdish-ordering-transparent-styles.php
    • > /wp-content/plugins/flipdish-ordering-system/includes/banners/ct-us.php
    • > /wp-content/plugins/flipdish-ordering-system/includes/banners/ct-uk-ie.php
    • > /wp-content/plugins/flipdish-ordering-system/includes/banners/ct-es.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_settings_section() in wp-content/plugins/flipdish-ordering-system/admin/settings/configuration.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_settings_section() in wp-content/plugins/flipdish-ordering-system/admin/settings/payments.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_settings_section() in wp-content/plugins/flipdish-ordering-system/admin/settings/display.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
5 plugin tags: collection, takeaway, flipdish, online ordering, delivery

flipdish-ordering-system/flipdish-ordering.php 85% from 13 tests

The principal PHP file in "Flipdish Ordering System" v. 1.4.16 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("flipdish-ordering-system.php" instead of "flipdish-ordering.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected903 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP22345214803
CSS3122362
JavaScript13326
HTML40012

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity9.25
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods125.00%
▷ Protected methods00.00%
▷ Private methods375.00%
Functions30
▷ Named functions30100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.81MB with 0.52MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png680.20KB173.07KB▼ 74.56%
admin/images/flipdish_header_large.png22.59KB11.58KB▼ 48.72%
assets/screenshot-3.png38.27KB15.11KB▼ 60.52%
assets/screenshot-1.png84.57KB43.77KB▼ 48.25%
admin/images/flipdish_icon_small.png5.84KB0.71KB▼ 87.79%