84% menukaart

Code Review | Menukaart - Restaurant Menu & Online Ordering with WooCommerce

WordPress plugin Menukaart - Restaurant Menu & Online Ordering with WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: menukaart
  • Plugin version: 1.5
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.2.2
  • WordPress version: 6.3.1
  • First release: Sep 17, 2021
  • Latest release: Jun 26, 2023
  • Number of updates: 41
  • Update frequency: every 15.8 days
  • Top authors: mhmrajib (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,127 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.17MB] [CPU: ▼2.69ms] Passed 4 tests

This is a short check of server-side resources used by Menukaart - Restaurant Menu & Online Ordering with WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1640.17 ▲0.25
Dashboard /wp-admin3.47 ▲0.1647.23 ▼2.27
Posts /wp-admin/edit.php3.58 ▲0.2245.32 ▼0.80
Add New Post /wp-admin/post-new.php6.07 ▲0.1889.35 ▼3.64
Media Library /wp-admin/upload.php3.39 ▲0.1633.97 ▼4.06
Add Menu Item /wp-admin/post-new.php?post_type=menukaart3.5448.14
Manage Views /wp-admin/edit.php?post_type=menukaart&page=menukaart-manage-views3.4235.61
All Menu Items /wp-admin/edit.php?post_type=menukaart3.4338.75
Usage & Tutorial /wp-admin/edit.php?post_type=menukaart&page=menukaart-get-help3.3630.99
Courses /wp-admin/edit-tags.php?taxonomy=menukaart_courses&post_type=menukaart3.3941.21

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 90 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Menukaart - Restaurant Menu & Online Ordering with WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,968 ▲20713.45 ▼1.129.53 ▲7.9741.51 ▲2.45
Dashboard /wp-admin2,257 ▲775.90 ▲0.2486.32 ▲0.4536.34 ▼3.35
Posts /wp-admin/edit.php2,164 ▲672.25 ▲0.2337.53 ▲2.0835.74 ▼3.68
Add New Post /wp-admin/post-new.php1,584 ▲4523.30 ▲4.84649.61 ▲8.5034.21 ▼35.60
Media Library /wp-admin/upload.php1,456 ▲534.40 ▲0.2199.66 ▲0.4942.48 ▼1.88
Add Menu Item /wp-admin/post-new.php?post_type=menukaart2,4697.87189.7065.08
Manage Views /wp-admin/edit.php?post_type=menukaart&page=menukaart-manage-views1,7581.9427.7755.84
All Menu Items /wp-admin/edit.php?post_type=menukaart1,1332.2132.9527.63
Usage & Tutorial /wp-admin/edit.php?post_type=menukaart&page=menukaart-get-help1,4819.33265.6395.66
Courses /wp-admin/edit-tags.php?taxonomy=menukaart_courses&post_type=menukaart1,3442.0031.8331.80

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 does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/menukaart/admin/view/help-usage.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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: restaurant, food, caf menu, food menu, restaurant menu

menukaart/menukaart.php Passed 13 tests

The main PHP script in "Menukaart - Restaurant Menu & Online Ordering with WooCommerce" version 1.5 is automatically included on every request by WordPress
78 characters long description:
A simple restaurant food menu plugin that displays menu items in your webpage.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin11,045 lines of code in 60 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
CSS553252,600
PHP21213762,000
Sass1536361,796
LESS1536461,786
PO File17080170
JavaScript281622

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity6.14
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity1.95
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits3
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods38
▷ Static methods00.00%
▷ Public methods2565.79%
▷ Protected methods1026.32%
▷ Private methods37.89%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin