83% restaurant-food-menu

Code Review | Restaurant Food Menu by WP Darko – Drag & Drop Restaurant Menu Builder for WordPress

WordPress plugin Restaurant Food Menu by WP Darko – Drag & Drop Restaurant Menu Builder for WordPress scored83%from 54 tests.

About plugin

  • Plugin page: restaurant-food-menu
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Oct 16, 2023
  • Latest release: Oct 18, 2023
  • Number of updates: 18
  • Update frequency: every 0.2 days
  • Top authors: spwebguy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /57 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼3.85ms] Passed 4 tests

A check of server-side resources used by Restaurant Food Menu by WP Darko – Drag & Drop Restaurant Menu Builder for WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1539.00 ▲0.25
Dashboard /wp-admin3.46 ▲0.1552.85 ▲2.29
Posts /wp-admin/edit.php3.57 ▲0.2154.09 ▼1.03
Add New Post /wp-admin/post-new.php6.04 ▲0.1597.22 ▼16.91
Media Library /wp-admin/upload.php3.38 ▲0.1537.79 ▲3.95
All Food Items /wp-admin/edit.php?post_type=rfm_food_item3.4238.11
All Food Menus /wp-admin/edit.php?post_type=rfm_food_menu3.4238.36
Add New /wp-admin/post-new.php?post_type=rfm_food_menu3.4244.32
Add New /wp-admin/post-new.php?post_type=rfm_food_item3.4145.93

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Restaurant Food Menu by WP Darko – Drag & Drop Restaurant Menu Builder for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲10314.38 ▲0.032.12 ▼0.1041.56 ▼4.91
Dashboard /wp-admin2,246 ▲695.62 ▼0.0288.07 ▼3.5239.32 ▼5.07
Posts /wp-admin/edit.php2,148 ▲482.02 ▲0.0040.88 ▲5.9536.07 ▲0.55
Add New Post /wp-admin/post-new.php1,566 ▲3223.65 ▲5.53663.83 ▲27.7465.46 ▼0.63
Media Library /wp-admin/upload.php1,448 ▲544.15 ▼0.0495.22 ▼1.9344.16 ▲0.77
All Food Items /wp-admin/edit.php?post_type=rfm_food_item1,1242.3848.6731.60
All Food Menus /wp-admin/edit.php?post_type=rfm_food_menu1,1322.3745.7332.10
Add New /wp-admin/post-new.php?post_type=rfm_food_menu1,8472.9659.7243.81
Add New /wp-admin/post-new.php?post_type=rfm_food_item1,5812.8151.8929.70

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=rfm_food_item
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'length')" "TypeError: Cannot read properties of undefined (reading 'length')\n at /wp-content/plugins/restaurant-food-menu/inc/js/back.min.js?ver=6.3.1:1:1985\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/restaurant-food-menu/inc/js/back.min.js?ver=6.3.1:1:2182)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1:2:27292)" undefined
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=rfm_food_item
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of undefined (reading 'length')
    • > GET request to /wp-admin/post-new.php?post_type=rfm_food_menu
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1 1:28609 "jQuery.Deferred exception: Unexpected end of JSON input" "SyntaxError: Unexpected end of JSON input\n at JSON.parse (\u003Canonymous>)\n at /wp-content/plugins/restaurant-food-menu/inc/js/back.min.js?ver=6.3.1:1:8427\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/restaurant-food-menu/inc/js/back.min.js?ver=6.3.1:1:9913)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=rfm_food_menu
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1 1:28721 Uncaught SyntaxError: Unexpected end of JSON input
    • > GET request to /wp-admin/post-new.php?post_type=rfm_food_item
    • > Network (severe)
    wp-admin/none - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention: The official readme.txt is a good inspiration

restaurant-food-menu/rfm.php 77% from 13 tests

"Restaurant Food Menu by WP Darko – Drag & Drop Restaurant Menu Builder for WordPress" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 198 characters long)
  • Plugin Name: It is recommended to keep the plugin name shorter than 70 characters (currently 86 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("restaurant-food-menu.php" instead of "rfm.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin2,152 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
CSS4222241,017
PHP1311768699
JavaScript23549436

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin