10% online-restaurant-reservation

Code Review | Online Restaurant Reservation

WordPress plugin Online Restaurant Reservation scored10%from 54 tests.

About plugin

  • Plugin page: online-restaurant...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9
  • WordPress version: 6.3.1
  • First release: Dec 22, 2017
  • Latest release: Dec 22, 2017
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: wpeverest (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /4,706 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/online-restaurant-reservation/includes/orr-formatting-functions.php+235
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.60MB] [CPU: ▼48.23ms] Passed 4 tests

Server-side resources used by Online Restaurant Reservation
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.38 ▼1.087.45 ▼33.34
Dashboard /wp-admin2.40 ▼0.908.27 ▼40.72
Posts /wp-admin/edit.php2.40 ▼0.958.06 ▼38.46
Add New Post /wp-admin/post-new.php2.40 ▼3.489.20 ▼80.41
Media Library /wp-admin/upload.php2.40 ▼0.829.06 ▼24.07
Reservations /wp-admin/edit.php?post_type=table_reservation2.417.11
Settings /wp-admin/admin.php?page=orr-settings2.409.17
Reservations /wp-admin/admin.php?page=reservation2.409.14

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 155 new files
Database: 2 new tables, 12 new options
New tables
wp_orr_sessions
wp_orr_exceptions
New WordPress options
theysaidso_admin_options
online_restaurant_reservation_max_party_size
can_compress_scripts
online_restaurant_reservation_time_range_steps
online_restaurant_reservation_min_party_size
online_restaurant_reservation_admin_notices
widget_recent-posts
widget_theysaidso_widget
online_restaurant_reservation_version
db_upgraded
...

Browser metrics Passed 4 tests

An overview of browser requirements for Online Restaurant Reservation
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7014.34 ▼0.211.82 ▲0.0543.88 ▲0.20
Dashboard /wp-admin2,220 ▲435.50 ▼0.0387.15 ▼14.7739.58 ▼5.99
Posts /wp-admin/edit.php2,131 ▲311.98 ▲0.0034.37 ▼2.3335.86 ▼2.18
Add New Post /wp-admin/post-new.php1,560 ▲3118.22 ▼5.00631.00 ▼17.9471.88 ▲17.95
Media Library /wp-admin/upload.php1,431 ▲314.17 ▼0.0297.03 ▼12.3742.63 ▼3.70
Reservations /wp-admin/edit.php?post_type=table_reservation1,2933.0657.3749.87
Settings /wp-admin/admin.php?page=orr-settings1,0652.4049.6232.36
Reservations /wp-admin/admin.php?page=reservation280.420.063.22

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/online-restaurant-reservation/includes/orr-formatting-functions.php+235
    Array and string offset access syntax with curly braces is deprecated
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_orr_sessions
    • wp_orr_exceptions
  • Zombie WordPress options were found after uninstall: 12 options
    • db_upgraded
    • online_restaurant_reservation_min_party_size
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • online_restaurant_reservation_version
    • widget_theysaidso_widget
    • online_restaurant_reservation_time_range_steps
    • can_compress_scripts
    • online_restaurant_reservation_admin_notices
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 24 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=reservation
    • > Deprecated in wp-content/plugins/online-restaurant-reservation/includes/orr-formatting-functions.php+237
    Array and string offset access syntax with curly braces is deprecated

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=reservation
    • > Network (severe)
    wp-admin/admin.php?page=reservation - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration Passed 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: bookings, restaurant, table reservation, reservations, table bookings

online-restaurant-reservation/online-restaurant-reservation.php Passed 13 tests

The entry point to "Online Restaurant Reservation" version 1.0.0 is a PHP file that has certain tags in its header comment area
67 characters long description:
Accept online restaurant reservations and table bookings with ease.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin27,415 lines of code in 145 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript262,67287210,866
PHP962,3186,3108,894
JSON1005,054
Sass1036132,543
SVG20146
CSS100012

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity18.60
▷ Minimum class complexity1.00
▷ Maximum class complexity107.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes53
▷ Abstract classes815.09%
▷ Concrete classes4584.91%
▷ Final classes12.22%
Methods589
▷ Static methods11719.86%
▷ Public methods44375.21%
▷ Protected methods7212.22%
▷ Private methods7412.56%
Functions92
▷ Named functions92100.00%
▷ Anonymous functions00.00%
Constants22
▷ Global constants940.91%
▷ Class constants1359.09%
▷ Public constants13100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/select2.png0.60KB0.99KB0.00%
assets/images/select2x2.png0.83KB0.77KB▼ 6.15%