78% dinner-reservations-calendar

Code Review | Dinner Reservations Calendar (with Couverts)

WordPress plugin Dinner Reservations Calendar (with Couverts) scored78%from 54 tests.

About plugin

  • Plugin page: dinner-reservatio...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.5.3
  • WordPress version: 6.3.1
  • First release: Aug 11, 2016
  • Latest release: Oct 5, 2016
  • Number of updates: 23
  • Update frequency: every 2.4 days
  • Top authors: peter.eussen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /760 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.01MB] [CPU: ▼4.46ms] Passed 4 tests

A check of server-side resources used by Dinner Reservations Calendar (with Couverts)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.76 ▼3.72
Dashboard /wp-admin3.33 ▼0.0152.04 ▼12.83
Posts /wp-admin/edit.php3.38 ▲0.0349.85 ▲6.53
Add New Post /wp-admin/post-new.php5.91 ▲0.0394.73 ▼5.38
Media Library /wp-admin/upload.php3.25 ▲0.0336.45 ▲4.08
Couverts /wp-admin/options-general.php?page=couverts3.1930.53

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Dinner Reservations Calendar (with Couverts)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲8713.59 ▼1.022.01 ▲0.2540.00 ▼3.45
Dashboard /wp-admin2,217 ▲264.85 ▼1.06109.58 ▼5.5242.23 ▼5.82
Posts /wp-admin/edit.php2,096 ▲71.99 ▼0.0539.37 ▲0.9135.87 ▲2.59
Add New Post /wp-admin/post-new.php1,540 ▲2623.12 ▲5.61619.05 ▼57.7446.46 ▼4.93
Media Library /wp-admin/upload.php1,399 ▲144.22 ▲0.0395.62 ▼8.9044.49 ▼1.22
Couverts /wp-admin/options-general.php?page=couverts8631.9922.6529.67

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=couverts
    • > Notice in wp-content/plugins/dinner-reservations-calendar/src/AdminOptions.php+148
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=couverts
    • > Notice in wp-content/plugins/dinner-reservations-calendar/src/AdminOptions.php+151
    Undefined index: settings-updated

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 fix the following items
  • 29× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Trying to get property 'BirthDate' of non-object in wp-content/plugins/dinner-reservations-calendar/templates/couverts/form-contact.php on line 66
    • > PHP Notice
      Trying to get property 'Show' of non-object in wp-content/plugins/dinner-reservations-calendar/templates/couverts/form-contact.php on line 56
    • > PHP Notice
      Trying to get property 'Show' of non-object in wp-content/plugins/dinner-reservations-calendar/templates/couverts/form-contact.php on line 35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/dinner-reservations-calendar/couverts.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/dinner-reservations-calendar/templates/couverts/form-js.php:2
    • > PHP Notice
      Undefined variable: inputFields in wp-content/plugins/dinner-reservations-calendar/templates/couverts/form-contact.php on line 35
    • > PHP Notice
      Trying to get property 'Email' of non-object in wp-content/plugins/dinner-reservations-calendar/templates/couverts/form-contact.php on line 35
    • > PHP Notice
      Trying to get property 'LastName' of non-object in wp-content/plugins/dinner-reservations-calendar/templates/couverts/form-contact.php on line 24
    • > PHP Notice
      Trying to get property 'Show' of non-object in wp-content/plugins/dinner-reservations-calendar/templates/couverts/form-contact.php on line 14
    • > PHP Notice
      Trying to get property 'Show' of non-object in wp-content/plugins/dinner-reservations-calendar/templates/couverts/form-contact.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: couverts, api, forms, shortcode, reservation

dinner-reservations-calendar/couverts.php 85% from 13 tests

The principal PHP file in "Dinner Reservations Calendar (with Couverts)" v. 1.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("dinner-reservations-calendar.php" instead of "couverts.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
No dangerous file extensions were detected1,067 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP12243309977
PO File1384490

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.35
Average class complexity8.00
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods47
▷ Static methods1327.66%
▷ Public methods4187.23%
▷ Protected methods00.00%
▷ Private methods612.77%
Functions16
▷ Named functions1275.00%
▷ Anonymous functions425.00%
Constants3
▷ Global constants3100.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
No PNG images were found in this plugin