74% food-drink-menu-house

Code Review | Food & Drink Menu House

WordPress plugin Food & Drink Menu House scored74%from 54 tests.

About plugin

  • Plugin page: food-drink-menu-h...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.7.5
  • WordPress version: 6.3.1
  • First release: May 25, 2017
  • Latest release: May 25, 2017
  • Number of updates: 18
  • Update frequency: every 2.9 days
  • Top authors: rakib1979 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,362 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.80ms] Passed 4 tests

This is a short check of server-side resources used by Food & Drink Menu House
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.28 ▼1.99
Dashboard /wp-admin3.39 ▲0.0845.10 ▼7.15
Posts /wp-admin/edit.php3.44 ▲0.0843.70 ▼3.99
Add New Post /wp-admin/post-new.php5.97 ▲0.0889.99 ▼10.08
Media Library /wp-admin/upload.php3.31 ▲0.0835.41 ▲3.64
Other Plugins /wp-admin/admin.php?page=food-menu-ultimate-other-plugins3.2831.94
List All /wp-admin/admin.php?page=food-menu-ultimate3.2831.20
New Items /wp-admin/admin.php?page=food-menu-ultimate-new3.3029.80

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 34 new files
Database: 2 new tables, 7 new options
New tables
wp_food_menu_list
wp_food_menu_style
New WordPress options
theysaidso_admin_options
food_menu_ultimate_version
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Food & Drink Menu House: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲9913.25 ▼1.131.79 ▲0.0543.77 ▼1.32
Dashboard /wp-admin2,240 ▲525.86 ▼0.04102.20 ▼11.6739.43 ▼4.77
Posts /wp-admin/edit.php2,123 ▲341.99 ▼0.0334.52 ▼2.4435.53 ▲2.42
Add New Post /wp-admin/post-new.php1,565 ▲2318.40 ▼4.40597.80 ▼88.6049.20 ▼16.90
Media Library /wp-admin/upload.php1,422 ▲314.17 ▼0.04100.13 ▼0.4644.02 ▲1.21
Other Plugins /wp-admin/admin.php?page=food-menu-ultimate-other-plugins9192.0127.1634.57
List All /wp-admin/admin.php?page=food-menu-ultimate8442.1726.3643.44
New Items /wp-admin/admin.php?page=food-menu-ultimate-new1,3072.1526.8881.95

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_food_menu_style
    • wp_food_menu_list
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • food_menu_ultimate_version
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=food-menu-ultimate-new
    • > Notice in wp-content/plugins/food-drink-menu-house/admin.php+67
    Undefined index: styleid
    • > GET request to /wp-admin/admin.php?page=food-menu-ultimate-new
    • > Notice in wp-content/plugins/food-drink-menu-house/admin/style-new.php+9
    Undefined index: submit

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% 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:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can take inspiration from this readme.txt

food-drink-menu-house/index.php 92% from 13 tests

Analyzing the main PHP file in "Food & Drink Menu House" version 1.0
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("food-drink-menu-house.php" instead of "index.php")

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
Good job! No executable or dangerous file extensions detected7,553 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP99594,221
SVG1002,671
CSS44816589
JavaScript552172

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/style1.png1.12KB0.20KB▼ 81.99%
other-plugins/sb-image-hover-effects.png8.13KB6.68KB▼ 17.76%
other-plugins/responsive-tabs-with-accordions.png3.58KB2.46KB▼ 31.31%
other-plugins/image-hover-effects-ultimate.png11.81KB9.85KB▼ 16.63%
other-plugins/accordions-or-faqs.png4.64KB3.60KB▼ 22.50%