73% best-restaurant-menu-by-pricelisto

Code Review | Best Restaurant Menu by PriceListo

WordPress plugin Best Restaurant Menu by PriceListo scored73%from 54 tests.

About plugin

  • Plugin page: best-restaurant-m...
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-5.8.1
  • WordPress version: 6.3.1
  • First release: Jan 23, 2020
  • Latest release: Oct 4, 2021
  • Number of updates: 24
  • Update frequency: every 25.9 days
  • Top authors: pricelisto (70.83%)mahmoudbasiony (33.33%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active /13,021 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.29MB] [CPU: ▲2.82ms] Passed 4 tests

An overview of server-side resources used by Best Restaurant Menu by PriceListo
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1937.67 ▼3.44
Dashboard /wp-admin3.67 ▲0.3651.34 ▲3.81
Posts /wp-admin/edit.php3.72 ▲0.3758.03 ▲12.88
Add New Post /wp-admin/post-new.php6.19 ▲0.3193.07 ▼1.22
Media Library /wp-admin/upload.php3.51 ▲0.2848.00 ▲12.12
Menu /wp-admin/admin.php?page=brm-menu3.5136.73
Settings /wp-admin/admin.php?page=brm-settings3.6741.69

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 211 new files
Database: 3 new tables, 6 new options
New tables
wp_brm_options
wp_brm_items
wp_brm_groups
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Best Restaurant Menu by PriceListo
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,174 ▲41715.53 ▲1.158.82 ▲6.6444.40 ▼2.85
Dashboard /wp-admin2,390 ▲2116.80 ▲1.91140.76 ▲34.4143.15 ▲0.06
Posts /wp-admin/edit.php2,300 ▲2113.65 ▲1.6655.69 ▲18.8733.18 ▼0.45
Add New Post /wp-admin/post-new.php1,706 ▲18522.81 ▼0.27611.85 ▼67.8938.85 ▼10.41
Media Library /wp-admin/upload.php1,434 ▲464.47 ▲0.2690.60 ▼10.0943.74 ▲0.04
Menu /wp-admin/admin.php?page=brm-menu1,0043.3440.4323.89
Settings /wp-admin/admin.php?page=brm-settings3,3793.8955.3362.58

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 3 tables in the database
    • wp_brm_items
    • wp_brm_options
    • wp_brm_groups
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/best-restaurant-menu-by-pricelisto/templates/admin/vendor/currencies.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/best-restaurant-menu-by-pricelisto/templates/admin/vendor/currency-symbols.php:5

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

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention: You can look at the official readme.txt

best-restaurant-menu-by-pricelisto/best-restaurant-menu.php 77% from 13 tests

"Best Restaurant Menu by PriceListo" version 1.3.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("best-restaurant-menu-by-pricelisto.php" instead of "best-restaurant-menu.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 181 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin48,070 lines of code in 175 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript818,0094,89631,641
CSS242781596,057
PHP315351,4412,812
SVG1002,671
Sass1434341,768
LESS1434441,758
HTML215216842
Markdown4790354
JSON400167

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity20.00
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity3.94
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods71
▷ Static methods2839.44%
▷ Public methods7098.59%
▷ Protected methods00.00%
▷ Private methods11.41%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/dist/vendor/jquery-ui/images/ui-icons_777620_256x240.png4.57KB4.18KB▼ 8.43%
assets/dist/vendor/lightbox2/dist/images/prev.png1.33KB1.59KB0.00%
assets/dist/vendor/lightbox2/dist/images/next.png1.32KB1.58KB0.00%
assets/dist/vendor/jquery-ui/images/ui-icons_777777_256x240.png6.85KB4.18KB▼ 38.94%
assets/dist/vendor/jquery-ui/images/ui-icons_ffffff_256x240.png6.17KB4.18KB▼ 32.17%