78% restaurant-menu-manager

Code Review | Restaurant Menu Manager

WordPress plugin Restaurant Menu Manager scored 78% from 54 tests.

About plugin

  • Plugin page: restaurant-menu-m...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.2
  • WordPress version: 6.3.1
  • First release: Dec 5, 2013
  • Latest release: May 10, 2016
  • Number of updates: 21
  • Update frequency: every 42.2 days
  • Top authors: noumaan (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active / 15,915 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.15MB] [CPU: ▼15.88ms] Passed 4 tests

A check of server-side resources used by Restaurant Menu Manager
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0636.05 ▼4.14
Dashboard /wp-admin3.16 ▼0.1428.39 ▼22.00
Posts /wp-admin/edit.php3.29 ▼0.0734.00 ▼10.82
Add New Post /wp-admin/post-new.php5.49 ▼0.4074.13 ▼23.40
Media Library /wp-admin/upload.php3.22 ▼0.0127.81 ▼7.29
All Restaurant Menu Entries /wp-admin/edit.php?post_type=rm-menu-entry3.2730.13
Entry Tags /wp-admin/edit-tags.php?taxonomy=rm-entry-tags&post_type=rm-menu-entry3.2228.47
Menu Type /wp-admin/edit-tags.php?taxonomy=rm-menu-type&post_type=rm-menu-entry3.2229.26
New Restaurant Menu Entry /wp-admin/post-new.php?post_type=rm-menu-entry3.2938.69

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Restaurant Menu Manager
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲10613.40 ▼1.041.62 ▼0.1641.43 ▼2.11
Dashboard /wp-admin2,247 ▲584.87 ▼0.07108.57 ▼11.0944.05 ▼0.27
Posts /wp-admin/edit.php2,127 ▲342.06 ▲0.0938.97 ▼0.9238.71 ▲4.57
Add New Post /wp-admin/post-new.php1,560 ▲2723.03 ▼0.26683.36 ▲48.0555.84 ▲12.67
Media Library /wp-admin/upload.php1,426 ▲444.21 ▲0.0193.49 ▼5.2444.38 ▲2.12
All Restaurant Menu Entries /wp-admin/edit.php?post_type=rm-menu-entry1,1471.9432.2435.72
Entry Tags /wp-admin/edit-tags.php?taxonomy=rm-entry-tags&post_type=rm-menu-entry1,2692.1426.9830.98
Menu Type /wp-admin/edit-tags.php?taxonomy=rm-menu-type&post_type=rm-menu-entry1,3002.1427.1031.00
New Restaurant Menu Entry /wp-admin/post-new.php?post_type=rm-menu-entry2,6727.80180.6973.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=rm-menu-entry
    • > Notice in wp-content/plugins/restaurant-menu-manager/restaurant-menu.php+250
    Undefined variable: iconurl

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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/restaurant-menu-manager/restaurant-menu.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
Attributes that require attention: You can take inspiration from this readme.txt

restaurant-menu-manager/restaurant-menu.php 92% from 13 tests

Analyzing the main PHP file in "Restaurant Menu Manager" version 1.0.5
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("restaurant-menu-manager.php" instead of "restaurant-menu.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected711 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP112758387
CSS12224314
JavaScript20010

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/rm-menu-icon.png0.51KB0.44KB▼ 13.96%