57% easy-pdf-restaurant-menu-upload

Code Review | Easy restaurant menu manager

WordPress plugin Easy restaurant menu manager scored57%from 54 tests.

About plugin

  • Plugin page: easy-pdf-restaura...
  • Plugin version: 1.7.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Jul 22, 2018
  • Latest release: Nov 28, 2023
  • Number of updates: 62
  • Update frequency: every 31.5 days
  • Top authors: nikelschubert (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /5,328 total downloads

Benchmarks

Plugin footprint 48% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.16MB] [CPU: ▼4.77ms] Passed 4 tests

This is a short check of server-side resources used by Easy restaurant menu manager
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1647.19 ▲4.63
Dashboard /wp-admin3.48 ▲0.1350.79 ▼12.23
Posts /wp-admin/edit.php3.59 ▲0.2446.93 ▲0.08
Add New Post /wp-admin/post-new.php6.07 ▲0.1893.47 ▼7.15
Media Library /wp-admin/upload.php3.40 ▲0.1737.36 ▲0.22
Easy Menu Upload /wp-admin/upload.php?page=easy-pdf-restaurant-menu3.4038.15

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Easy restaurant menu manager: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲4714.26 ▼0.002.00 ▲0.0345.14 ▲2.28
Dashboard /wp-admin2,199 ▲185.56 ▼0.2095.93 ▼5.6641.78 ▼1.41
Posts /wp-admin/edit.php2,101 ▲11.95 ▼0.0135.15 ▼5.1934.83 ▲1.09
Add New Post /wp-admin/post-new.php1,688 ▲14821.90 ▼1.06660.11 ▲72.8953.46 ▲6.30
Media Library /wp-admin/upload.php1,404 ▲14.19 ▼0.0798.98 ▲0.0940.67 ▲0.12
Easy Menu Upload /wp-admin/upload.php?page=easy-pdf-restaurant-menu8961.9922.3832.24

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/easy-pdf-restaurant-menu-upload/uninstall.php+8
    Constant PLUGIN_PATH_nsc_eprm already defined
  • The plugin did not uninstall correctly, leaving 19 files (0.09MB) in the plugin directory
    • (new file) admin/tpl/tab_description_help.html
    • (new file) class/class-admin-html-formfields-nsc_eprm.php
    • (new file) class/class-input-validation-nsc_eprm.php
    • (new file) class/class-api-nsc_eprm.php
    • (new file) LICENCE
    • (new file) admin/js/admin.js
    • (new file) class/class-gutenberg-blocks-nsc_eprm.php
    • (new file) admin/tpl/tab_upload_description.html
    • (new file) admin/tpl/admin.php
    • (new file) class/class-admin-settings-nsc_eprm.php
    • ...
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • recovery_mode_email_last_sent
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/easy-pdf-restaurant-menu-upload/uninstall.php
  • 21× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/easy-pdf-restaurant-menu-upload/admin/tpl/admin.php:26
    • > PHP Notice
      Trying to get property 'tabs' of non-object in wp-content/plugins/easy-pdf-restaurant-menu-upload/admin/tpl/admin.php on line 24
    • > PHP Notice
      Trying to get property 'tabs' of non-object in wp-content/plugins/easy-pdf-restaurant-menu-upload/admin/tpl/admin.php on line 22
    • > PHP Notice
      Undefined variable: settings_object in wp-content/plugins/easy-pdf-restaurant-menu-upload/admin/tpl/admin.php on line 22
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/easy-pdf-restaurant-menu-upload/admin/tpl/admin.php on line 22
    • > PHP Notice
      Undefined variable: settings_object in wp-content/plugins/easy-pdf-restaurant-menu-upload/admin/tpl/admin.php on line 18
    • > PHP Notice
      Trying to get property 'tabs' of non-object in wp-content/plugins/easy-pdf-restaurant-menu-upload/admin/tpl/admin.php on line 8
    • > PHP Notice
      Trying to get property 'setting_page_fields' of non-object in wp-content/plugins/easy-pdf-restaurant-menu-upload/admin/tpl/admin.php on line 24
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/easy-pdf-restaurant-menu-upload/admin/tpl/admin.php on line 8
    • > PHP Notice
      Undefined variable: settings_object in wp-content/plugins/easy-pdf-restaurant-menu-upload/admin/tpl/admin.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Contributors: Plugin contributors not specified
You can take inspiration from this readme.txt

easy-pdf-restaurant-menu-upload/nsc_easy-pdf-restaurant-menu.php 77% from 13 tests

The principal PHP file in "Easy restaurant menu manager" v. 1.7.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 351 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("easy-pdf-restaurant-menu-upload.php" instead of "nsc_easy-pdf-restaurant-menu.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
No dangerous file extensions were detected991 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP1214835860
JSON10093
HTML21037
JavaScript1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity14.75
▷ Minimum class complexity2.00
▷ Maximum class complexity39.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods67
▷ Static methods00.00%
▷ Public methods4059.70%
▷ Protected methods00.00%
▷ Private methods2740.30%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants6
▷ Global constants6100.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
No PNG files were detected