79% vendomat-gastrofix-menu

Code Review | GASTROFIX Menu Plugin

WordPress plugin GASTROFIX Menu Plugin scored 79% from 54 tests.

About plugin

  • Plugin page: vendomat-gastrofi...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 22, 2019
  • Latest release: Jun 12, 2020
  • Number of updates: 7
  • Update frequency: every 42.1 days
  • Top authors: vendomat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 595 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▲2.46ms] Passed 4 tests

An overview of server-side resources used by GASTROFIX Menu Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0144.16 ▼1.88
Dashboard /wp-admin3.33 ▲0.0253.79 ▼3.06
Posts /wp-admin/edit.php3.38 ▲0.0254.61 ▲8.09
Add New Post /wp-admin/post-new.php5.93 ▲0.0497.30 ▲7.39
Media Library /wp-admin/upload.php3.25 ▲0.0242.74 ▲7.38
Artikelgruppen /wp-admin/admin.php?page=vendomat-gastrofix-menu-presentation3.2736.77
GASTROFIX Menu Plugin /wp-admin/admin.php?page=vendomat-gastrofix-menu3.2636.49
Artikelliste /wp-admin/admin.php?page=vendomat-gastrofix-menu-articlelist3.2741.23
API Einrichtung /wp-admin/admin.php?page=vendomat-gastrofix-menu-api-settings3.2735.03

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 48 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
recovery_mode_email_last_sent
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for GASTROFIX Menu Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲6113.22 ▲0.041.83 ▲0.1045.92 ▲2.18
Dashboard /wp-admin2,244 ▲354.90 ▲0.05101.65 ▲3.4377.33 ▲37.29
Posts /wp-admin/edit.php2,142 ▲532.00 ▼0.0638.71 ▼8.1934.61 ▼1.93
Add New Post /wp-admin/post-new.php1,561 ▲2819.34 ▼3.79702.59 ▲0.7529.68 ▼16.27
Media Library /wp-admin/upload.php1,441 ▲534.24 ▲0.0395.65 ▼17.2579.44 ▲33.12
Artikelgruppen /wp-admin/admin.php?page=vendomat-gastrofix-menu-presentation7241.347.4424.74
GASTROFIX Menu Plugin /wp-admin/admin.php?page=vendomat-gastrofix-menu7241.557.1517.11
Artikelliste /wp-admin/admin.php?page=vendomat-gastrofix-menu-articlelist7241.557.7123.10
API Einrichtung /wp-admin/admin.php?page=vendomat-gastrofix-menu-api-settings7241.557.3623.67

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vendomat-gastrofix-menu-api-settings
    • > Warning in wp-content/plugins/vendomat-gastrofix-menu/extensions/requests/licenseHandler.php+12
    Use of undefined constant license_key - assumed 'license_key' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=vendomat-gastrofix-menu-presentation
    • > Error in wp-content/plugins/vendomat-gastrofix-menu/extensions/requests/licenseHandler.php+18
    Uncaught Error: Cannot use object of type WP_Error as array in wp-content/plugins/vendomat-gastrofix-menu/extensions/requests/licenseHandler.php:18
    Stack trace:
    #0 wp-content/plugins/vendomat-gastrofix-menu/option_pages/menu_presentation.php(8): gastrofix_menu_pluginIsActivated()
    #1 wp-content/plugins/vendomat-gastrofix-menu/admin_menu.php(52): require_once('/var/www/wordpr...')
    #2 wp-includes/class-wp-hook.php(310): gastrofix_menu_p_menu_presentation()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 {main}
    thrown
    • > GET request to /wp-admin/admin.php?page=vendomat-gastrofix-menu
    • > Error in wp-content/plugins/vendomat-gastrofix-menu/extensions/requests/licenseHandler.php+18
    Uncaught Error: Cannot use object of type WP_Error as array in wp-content/plugins/vendomat-gastrofix-menu/extensions/requests/licenseHandler.php:18
    Stack trace:
    #0 wp-content/plugins/vendomat-gastrofix-menu/option_pages/plugin_description.php(5): gastrofix_menu_pluginIsActivated()
    #1 wp-content/plugins/vendomat-gastrofix-menu/admin_menu.php(74): require_once('/var/www/wordpr...')
    #2 wp-includes/class-wp-hook.php(310): gastrofix_menu_p_plugin_description()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 {main}
    thrown
    • > GET request to /wp-admin/admin.php?page=vendomat-gastrofix-menu-articlelist
    • > Error in wp-content/plugins/vendomat-gastrofix-menu/extensions/requests/licenseHandler.php+18
    Uncaught Error: Cannot use object of type WP_Error as array in wp-content/plugins/vendomat-gastrofix-menu/extensions/requests/licenseHandler.php:18
    Stack trace:
    #0 wp-content/plugins/vendomat-gastrofix-menu/option_pages/articlelist.php(8): gastrofix_menu_pluginIsActivated()
    #1 wp-content/plugins/vendomat-gastrofix-menu/admin_menu.php(65): require_once('/var/www/wordpr...')
    #2 wp-includes/class-wp-hook.php(310): gastrofix_menu_p_articlelist()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 {main}
    thrown
    • > GET request to /wp-admin/admin.php?page=vendomat-gastrofix-menu-api-settings
    • > Error in wp-content/plugins/vendomat-gastrofix-menu/extensions/requests/licenseHandler.php+18
    Uncaught Error: Cannot use object of type WP_Error as array in wp-content/plugins/vendomat-gastrofix-menu/extensions/requests/licenseHandler.php:18
    Stack trace:
    #0 wp-content/plugins/vendomat-gastrofix-menu/option_pages/api_settings.php(5): gastrofix_menu_pluginIsActivated()
    #1 wp-content/plugins/vendomat-gastrofix-menu/admin_menu.php(39): require_once('/var/www/wordpr...')
    #2 wp-includes/class-wp-hook.php(310): gastrofix_menu_p_api_settings()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 {main}
    thrown

SRP 50% 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 items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/vendomat-gastrofix-menu/templates/basic1.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: digital menu, gastrofix, menuboard

vendomat-gastrofix-menu/vendomat-gastrofix-menu.php Passed 13 tests

The main PHP file in "GASTROFIX Menu Plugin" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
51 characters long description:
Digitale Speisekarte direkt aus der GASTROFIX Kasse

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected3,635 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript84386381,942
PHP151591131,026
JSON290494
CSS3312171
SVG2002

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.37
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods866.67%
▷ Protected methods00.00%
▷ Private methods433.33%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
11 compressed PNG files occupy 1.37MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
templates/assets/tomatoes.png976.72KB292.88KB▼ 70.01%
stylesheets/assets_datatables/sort_desc_disabled.png0.14KB0.25KB0.00%
stylesheets/assets_datatables/sort_asc.png0.16KB0.25KB0.00%
templates/assets/gray_sand.png16.58KB19.53KB0.00%
templates/assets/black_linen_v2.png137.38KB146.19KB0.00%