84% create-restaurant-menu

Code Review | Create Restaurant Menu

WordPress plugin Create Restaurant Menu scored84%from 54 tests.

About plugin

  • Plugin page: create-restaurant...
  • Plugin version: 0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.4
  • WordPress version: 6.3.1
  • First release: Jun 17, 2020
  • Latest release: Jun 25, 2020
  • Number of updates: 75
  • Update frequency: every 0.1 days
  • Top authors: mauriya (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /628 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▲1.89ms] Passed 4 tests

A check of server-side resources used by Create Restaurant Menu
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1643.42 ▲4.28
Dashboard /wp-admin3.44 ▲0.1353.54 ▲2.79
Posts /wp-admin/edit.php3.55 ▲0.1954.24 ▼2.94
Add New Post /wp-admin/post-new.php6.03 ▲0.14105.16 ▲8.82
Media Library /wp-admin/upload.php3.36 ▲0.1339.29 ▲3.43

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_crmenu_main_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Create Restaurant Menu
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲14713.57 ▼0.998.13 ▲6.4441.75 ▼5.44
Dashboard /wp-admin2,214 ▲375.75 ▲0.1788.20 ▼12.5874.44 ▲31.02
Posts /wp-admin/edit.php2,139 ▲362.27 ▲0.2438.04 ▼17.6035.41 ▼3.43
Add New Post /wp-admin/post-new.php6,442 ▲4,91622.32 ▼1.23918.28 ▲222.5639.17 ▼12.64
Media Library /wp-admin/upload.php1,425 ▲314.34 ▲0.09101.46 ▼0.9875.26 ▲28.70

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_crmenu_main_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/create-restaurant-menu/template/full-menu.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: restaurant menu page, restaurant menu, restaurant menu block, restaurant main menu, create menu

create-restaurant-menu/main.php 85% from 13 tests

Analyzing the main PHP file in "Create Restaurant Menu" version 0.1
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("create-restaurant-menu.php" instead of "main.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 230 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin998 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP790133792
CSS6059162
JavaScript44944

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity18.00
▷ Minimum class complexity7.00
▷ Maximum class complexity29.00
Average method complexity4.78
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods888.89%
▷ Protected methods00.00%
▷ Private methods111.11%
Functions11
▷ Named functions11100.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
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/rest-cart.png0.57KB0.46KB▼ 19.14%
img/spicy.png4.24KB2.03KB▼ 51.98%
img/resticon.png1.61KB0.67KB▼ 58.42%