68% advance-food-menu

Code Review | Advance Food Menu

WordPress plugin Advance Food Menu scored 68% from 54 tests.

About plugin

  • Plugin page: advance-food-menu
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Jul 26, 2018
  • Latest release: Jul 27, 2018
  • Number of updates: 5
  • Update frequency: every 2.6 days
  • Top authors: joyelkhan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 861 total downloads

Benchmarks

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

An overview of server-side resources used by Advance Food Menu
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1039.20 ▼1.60
Dashboard /wp-admin3.07 ▼0.2424.47 ▼21.06
Posts /wp-admin/edit.php3.07 ▼0.2924.06 ▼23.96
Add New Post /wp-admin/post-new.php3.07 ▼2.8223.40 ▼75.78
Media Library /wp-admin/upload.php3.07 ▼0.1623.80 ▼8.86
Advance Food Menu /wp-admin/edit.php?post_type=menu-item3.0723.72
Settings /wp-admin/edit.php?post_type=menu-item&page=settings3.0721.75
Menu Item Types /wp-admin/edit-tags.php?taxonomy=menu-item-type&post_type=menu-item3.0723.25
Add New /wp-admin/post-new.php?post_type=menu-item3.0723.53

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Advance Food Menu
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,131 ▲39614.72 ▲0.4721.94 ▲20.1953.76 ▲5.63
Dashboard /wp-admin2,240 ▲525.84 ▼0.06111.86 ▲6.5285.86 ▲44.06
Posts /wp-admin/edit.php2,126 ▲372.01 ▲0.0337.90 ▼3.3934.50 ▼2.41
Add New Post /wp-admin/post-new.php1,552 ▲3818.23 ▲0.55722.86 ▲49.7268.33 ▲9.98
Media Library /wp-admin/upload.php1,425 ▲374.18 ▼0.0295.61 ▼9.6081.66 ▲33.33
Advance Food Menu /wp-admin/edit.php?post_type=menu-item1,0841.9630.1930.85
Settings /wp-admin/edit.php?post_type=menu-item&page=settings8452.0223.2742.34
Menu Item Types /wp-admin/edit-tags.php?taxonomy=menu-item-type&post_type=menu-item1,2962.1426.4130.00
Add New /wp-admin/post-new.php?post_type=menu-item2,3217.66185.08133.45

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
These items require your attention
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

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 errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=menu-item
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
    • > GET request to /wp-admin/post-new.php?post_type=menu-item
    • > Notice in wp-content/plugins/advance-food-menu/includes/advance-food-menu-meta.php+35
    Undefined index: afm-price

SRP 50% 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
Almost there! Just fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advance-food-menu/includes/advance-food-menu-settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advance-food-menu/includes/advance-food-menu-meta.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advance-food-menu/includes/advance-food-menu-cpts.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/advance-food-menu/includes/advance-food-menu-shortcode.php:106

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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Contributors: The plugin contributors field is missing
Please take inspiration from this readme.txt

advance-food-menu/advance-food-menu.php Passed 13 tests

This is the main PHP file of "Advance Food Menu" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
73 characters long description:
The simplest solution to display beautiful restaurant menus in WordPress.

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 detected372 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP56426257
CSS321772
JavaScript584843

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
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%
Functions15
▷ Named functions15100.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
assets/images/food-icon.png0.47KB0.53KB0.00%