78% wc-booking

Code Review | Booking for wooCommerce

WordPress plugin Booking for wooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: wc-booking
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Sep 30, 2021
  • Latest release: Jun 13, 2022
  • Number of updates: 7
  • Update frequency: every 44.6 days
  • Top authors: istiaqnirab (57.14%)ok9xnirab (42.86%)springdevs (28.57%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /502 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Booking for wooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0849.65 ▲10.88
Dashboard /wp-admin3.38 ▲0.0844.41 ▼4.09
Posts /wp-admin/edit.php3.49 ▲0.1448.65 ▼0.84
Add New Post /wp-admin/post-new.php5.96 ▲0.0795.23 ▲1.78
Media Library /wp-admin/upload.php3.30 ▲0.0734.67 ▼0.43

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 50 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
simple booking_version
can_compress_scripts
widget_theysaidso_widget
simple booking_installed

Browser metrics Passed 4 tests

Booking for wooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲7414.86 ▲0.551.98 ▲0.1544.09 ▲1.73
Dashboard /wp-admin2,226 ▲384.85 ▼0.03110.04 ▲8.4145.56 ▲7.90
Posts /wp-admin/edit.php2,111 ▲222.05 ▼0.0141.56 ▲7.2038.95 ▲2.53
Add New Post /wp-admin/post-new.php1,557 ▲2418.50 ▼4.69623.50 ▼68.7454.04 ▲2.50
Media Library /wp-admin/upload.php1,405 ▲144.22 ▲0.0298.54 ▼2.5744.14 ▼3.92

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 8 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • simple booking_installed
    • simple booking_version
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wc-booking/includes/Admin/views/scripts.php
    • > /wp-content/plugins/wc-booking/includes/Admin/views/styles.php
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wc-booking/includes/Admin/views/plugin-notice.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wc-booking/includes/Admin/views/product-form.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wc-booking/includes/Frontend/views/date-html.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wc-booking/includes/Admin/views/booking-meta-form.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wc-booking/includes/Frontend/views/time-html.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wc-booking/includes/Admin/views/booking-save.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wc-booking/includes/Admin/views/booking-data.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_query_var() in wp-content/plugins/wc-booking/templates/myaccount/bookings.php:10

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 90% 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
These attributes need your attention:
  • Donate link: Please fix this invalid url: ""
Please take inspiration from this readme.txt

wc-booking/booking.php 85% from 13 tests

The main file in "Booking for wooCommerce" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wc-booking.php" instead of "booking.php")

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
Good job! No executable or dangerous file extensions detected2,115 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PHP464666262,107
JSON1005
CSS1003

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity9.69
▷ Minimum class complexity1.00
▷ Maximum class complexity65.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces0
Traits1
Classes25
▷ Abstract classes00.00%
▷ Concrete classes25100.00%
▷ Final classes14.00%
Methods132
▷ Static methods1410.61%
▷ Public methods12896.97%
▷ Protected methods00.00%
▷ Private methods43.03%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants8
▷ Global constants787.50%
▷ Class constants112.50%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin