68% menupublisher-4-wp

Code Review | MenuPublisher 4 WP

WordPress plugin MenuPublisher 4 WP scored 68% from 54 tests.

About plugin

  • Plugin page: menupublisher-4-wp
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Nov 4, 2016
  • Latest release: Dec 26, 2022
  • Number of updates: 19
  • Update frequency: every 118.1 days
  • Top authors: akrwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,531 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.93MB] [CPU: ▼53.74ms] Passed 4 tests

Server-side resources used by MenuPublisher 4 WP
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.405.44 ▼35.50
Dashboard /wp-admin2.08 ▼1.227.96 ▼46.25
Posts /wp-admin/edit.php2.08 ▼1.277.53 ▼41.73
Add New Post /wp-admin/post-new.php2.08 ▼3.808.37 ▼91.48
Media Library /wp-admin/upload.php2.08 ▼1.157.12 ▼29.08
MenuPublisher 4 WP /wp-admin/options-general.php?page=menupublisher_4_wp_options2.089.48

Server storage [IO: ▲0.33MB] [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: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for MenuPublisher 4 WP
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲17014.00 ▼0.404.94 ▲3.3137.87 ▼6.03
Dashboard /wp-admin2,214 ▲265.91 ▲0.9999.48 ▼14.5238.87 ▼5.80
Posts /wp-admin/edit.php2,097 ▲82.14 ▼0.0240.14 ▲1.5534.57 ▲4.32
Add New Post /wp-admin/post-new.php1,521 ▼2117.69 ▼0.62653.53 ▲48.5159.62 ▲4.98
Media Library /wp-admin/upload.php1,390 ▼14.18 ▲0.0396.02 ▼8.8642.16 ▼3.53
MenuPublisher 4 WP /wp-admin/options-general.php?page=menupublisher_4_wp_options8522.1828.0434.06

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the mmlt-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=menupublisher_4_wp_options
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the mmlt-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=menupublisher_4_wp_options
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the mmlt-admin-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=menupublisher_4_wp_options
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the mmlt-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=menupublisher_4_wp_options
    • > Notice in wp-content/plugins/menupublisher-4-wp/assets/templates/menupublisher-4-wp-settings.php+425
    Undefined index: sRestaurantInlineHash

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/menupublisher-4-wp/assets/templates/mmlt-templates.php
    • > /wp-content/plugins/menupublisher-4-wp/assets/templates/menupublisher-4-wp-startcode.php
    • > /wp-content/plugins/menupublisher-4-wp/assets/templates/menupublisher-4-wp-settings.php
    • > /wp-content/plugins/menupublisher-4-wp/menupublisher-4-wp.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% 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
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (After you've installed and activated the plugin, go to **Settings -> MenuPublisher 4 WP**, enter there the **RestaurantCode**, which you can find on [MenuPublisher -> Distribution -> Homepage](http://www.menupublisher.de/index.php?page=gastr_backend&spage=distr&sspage=wpPlugin#wp_inline "Distribution"). Save then click on **"+add code snippet"**.), #2 (Select a name for the snippet (it must be unique among all snippets), the layout, whether the snippet should show Lunch card and/or Menu. Then save.), #3 (Edit the page, where the data, that you selected in the snippet setup, should be displayed and add there the code via MenuPublisher 4 WP button. **IMPORTANT**: keep in mind, that you should use only one code snippet on any page, otherwise you get an error and the output of the code is not correct.)
The official readme.txt might help

menupublisher-4-wp/menupublisher-4-wp.php Passed 13 tests

The principal PHP file in "MenuPublisher 4 WP" v. 1.3 is loaded by WordPress automatically on each request
97 characters long description:
This plugin renders lunch or menus from a restaurant on MenuPublisher.de directly on your website

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
There were no executable files found in this plugin2,059 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP48043936
JavaScript36887728
CSS140228
PO File17377167

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity25.33
▷ Minimum class complexity11.00
▷ Maximum class complexity52.00
Average method complexity5.56
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16100.00%
▷ Public methods1062.50%
▷ Protected methods00.00%
▷ Private methods637.50%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin