68% restaurant-cafe-addon-for-elementor

Code Review | Restaurant & Cafe Addon for Elementor

WordPress plugin Restaurant & Cafe Addon for Elementor scored68%from 54 tests.

About plugin

  • Plugin page: restaurant-cafe-a...
  • Plugin version: 1.5.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.2
  • WordPress version: 6.3.1
  • First release: Mar 22, 2020
  • Latest release: Aug 17, 2023
  • Number of updates: 34
  • Update frequency: every 36.6 days
  • Top authors: nicheaddons (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

2,000+ active /24,637 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲4.92MB] [CPU: ▼17.27ms] Passed 4 tests

This is a short check of server-side resources used by Restaurant & Cafe Addon for Elementor
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /8.91 ▲5.4433.99 ▼6.88
Dashboard /wp-admin8.93 ▲5.6243.10 ▼6.81
Posts /wp-admin/edit.php8.93 ▲5.5746.90 ▼1.31
Add New Post /wp-admin/post-new.php8.93 ▲3.0443.80 ▼54.07
Media Library /wp-admin/upload.php8.93 ▲5.6942.29 ▲7.71
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius8.9338.56

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 358 new files
Database: no new tables, 9 new options
New WordPress options
fs_debug_mode
theysaidso_admin_options
fs_accounts
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
fs_active_plugins
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Restaurant & Cafe Addon for Elementor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,052 ▲31714.50 ▼0.0821.15 ▲19.3628.44 ▼13.85
Dashboard /wp-admin2,260 ▲725.89 ▲0.87118.16 ▲11.8490.01 ▲52.38
Posts /wp-admin/edit.php2,164 ▲752.16 ▲0.1439.99 ▼0.7038.51 ▲1.56
Add New Post /wp-admin/post-new.php1,560 ▲2723.42 ▲0.32684.64 ▲58.3334.78 ▼18.75
Media Library /wp-admin/upload.php1,460 ▲784.29 ▲0.07105.52 ▲5.3879.73 ▲35.79
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,1011.7927.1228.89

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/restaurant-cafe-addon-for-elementor/elementor/em-setup.php+158
    Use of undefined constant ELEMENTOR_VERSION - assumed 'ELEMENTOR_VERSION' (this will throw an Error in a future version of PHP)
  • This plugin does not fully uninstall, leaving 9 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • fs_accounts
    • theysaidso_admin_options
    • widget_recent-comments
    • fs_active_plugins
    • fs_debug_mode
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Warning in wp-content/plugins/restaurant-cafe-addon-for-elementor/elementor/em-setup.php+158
    Use of undefined constant ELEMENTOR_VERSION - assumed 'ELEMENTOR_VERSION' (this will throw an Error in a future version of PHP)

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
Please fix the following items
  • 42× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/restaurant-cafe-addon-for-elementor/elementor/narep-admin-functions.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Elementor\\get_option() in wp-content/plugins/restaurant-cafe-addon-for-elementor/elementor/widgets/basic/nabasic-chart.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Elementor\\get_option() in wp-content/plugins/restaurant-cafe-addon-for-elementor/elementor/widgets/restaurant-unique/narestaurant-unique-rooms.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Elementor\\get_option() in wp-content/plugins/restaurant-cafe-addon-for-elementor/elementor/widgets/restaurant-unique/narestaurant-unique-chefs-recipe.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Elementor\\get_option() in wp-content/plugins/restaurant-cafe-addon-for-elementor/elementor/widgets/basic/nabasic-history.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Elementor\\get_option() in wp-content/plugins/restaurant-cafe-addon-for-elementor/elementor/widgets/basic/nabasic-subscribe.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Elementor\\get_option() in wp-content/plugins/restaurant-cafe-addon-for-elementor/elementor/widgets/basic/nabasic-contact.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Elementor\\get_option() in wp-content/plugins/restaurant-cafe-addon-for-elementor/elementor/widgets/basic/nabasic-table.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/restaurant-cafe-addon-for-elementor/restaurant-cafe-addon-for-elementor.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Elementor\\get_option() in wp-content/plugins/restaurant-cafe-addon-for-elementor/elementor/widgets/basic/nabasic-team-single.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

restaurant-cafe-addon-for-elementor/restaurant-cafe-addon-for-elementor.php 92% from 13 tests

The main PHP script in "Restaurant & Cafe Addon for Elementor" version 1.5.2 is automatically included on every request by WordPress
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 220 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected116,896 lines of code in 266 files:
LanguageFilesBlank linesComment linesLines of code
PHP1649,32718,52362,559
JavaScript447,0927,43531,206
CSS441,75526921,181
SVG11801,947
JSON3003

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity68.92
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity5.07
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes88
▷ Abstract classes22.27%
▷ Concrete classes8697.73%
▷ Final classes00.00%
Methods1,499
▷ Static methods20513.68%
▷ Public methods1,03669.11%
▷ Protected methods916.07%
▷ Private methods37224.82%
Functions131
▷ Named functions12796.95%
▷ Anonymous functions43.05%
Constants149
▷ Global constants10067.11%
▷ Class constants4932.89%
▷ Public constants49100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
13 PNG files occupy 0.17MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/tables/chair.png34.92KB16.72KB▼ 52.12%
assets/images/map-marker.png1.42KB0.41KB▼ 71.38%
assets/images/tables/plate.png32.39KB20.33KB▼ 37.24%
assets/images/map-bg.png9.03KB9.96KB0.00%
assets/images/logo.png2.74KB2.20KB▼ 19.55%