67% rezgo

Code Review | Rezgo Online Booking

WordPress plugin Rezgo Online Booking scored67%from 54 tests.

About plugin

  • Plugin page: rezgo
  • Plugin version: 4.7.1
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Mar 4, 2011
  • Latest release: Oct 4, 2023
  • Number of updates: 234
  • Update frequency: every 19.7 days
  • Top authors: rezgo (84.62%)joshuarezgodev (15.81%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /20,202 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼8.53ms] Passed 4 tests

Server-side resources used by Rezgo Online Booking
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0529.56 ▼11.45
Dashboard /wp-admin3.39 ▲0.0945.05 ▼4.24
Posts /wp-admin/edit.php3.43 ▲0.0744.92 ▲0.68
Add New Post /wp-admin/post-new.php6.08 ▲0.1974.72 ▼13.54
Media Library /wp-admin/upload.php3.34 ▲0.1232.92 ▼4.90

Server storage [IO: ▲25.09MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please try to fix the following items
  • Try to limit filesystem usage to 25MB (currently using 25.09MB)
Filesystem: 596 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
rezgo_version
rezgo_template
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Rezgo Online Booking
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,005 ▲25913.63 ▼0.728.71 ▲6.5536.58 ▼12.45
Dashboard /wp-admin2,296 ▲1055.85 ▲1.0298.87 ▼25.3843.33 ▼2.34
Posts /wp-admin/edit.php2,185 ▲962.02 ▲0.0336.87 ▲1.2135.93 ▼0.08
Add New Post /wp-admin/post-new.php1,564 ▲4523.45 ▲0.12633.24 ▼59.4541.91 ▼15.03
Media Library /wp-admin/upload.php1,484 ▲934.28 ▲0.1195.66 ▼6.2044.11 ▼4.85

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • rezgo_template
    • rezgo_version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 7× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/rezgo/3ds_return_url.php
    • > /wp-content/plugins/rezgo/rezgo/templates/default/sidebar_reviews.php
    • > /wp-content/plugins/rezgo/rezgo/php_stripe/stripe/stripe-php/build.php
    • > /wp-content/plugins/rezgo/rezgo/templates/default/tips.php
    • > /wp-content/plugins/rezgo/rezgo/templates/default/error.php
    • > /wp-content/plugins/rezgo/rezgo/php_stripe/stripe/stripe-php/update_certs.php
    • > /wp-content/plugins/rezgo/robots.php
  • 321× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to get property 'switch' of non-object in wp-content/plugins/rezgo/rezgo/templates/default/tips.php on line 3
    • > PHP Notice
      Undefined variable: site in wp-content/plugins/rezgo/rezgo/templates/default/frame_header.php on line 5
    • > PHP Notice
      Undefined variable: site in wp-content/plugins/rezgo/rezgo/templates/default/booking_order.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to a member function sendTo() on null in wp-content/plugins/rezgo/rezgo/templates/default/gift_card_print.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/rezgo/rezgo/php_stripe/stripe/stripe-php/lib/Service/Issuing/CardholderService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/rezgo/rezgo/php_stripe/stripe/stripe-php/lib/Service/SourceService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/rezgo/rezgo/php_stripe/stripe/stripe-php/lib/Terminal/Location.php:21
    • > PHP Notice
      Undefined variable: site in wp-content/plugins/rezgo/rezgo/templates/default/topbar_order.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/rezgo/rezgo/php_stripe/stripe/stripe-php/lib/Service/EphemeralKeyService.php:7
    • > PHP Notice
      Undefined variable: site in wp-content/plugins/rezgo/rezgo/templates/default/calendar_month.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

rezgo/rezgo.php Passed 13 tests

The primary PHP file in "Rezgo Online Booking" version 4.7.1 is used by WordPress to initiate all plugin functionality
92 characters long description:
Connect WordPress to your Rezgo account and accept online bookings directly on your website.

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
These items require your attention
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/rezgo/rezgo/php_stripe/stripe/stripe-php/data/ca-certificates.crt
124,035 lines of code in 450 files:
LanguageFilesBlank linesComment linesLines of code
SVG2002953,177
PHP3338,14810,38132,386
CSS365,13074027,864
JavaScript311,3751,4418,846
Markdown36350944
HTML11180595
JSON1300162
XML10031
make19027
YAML1003

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please tend to the following items
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 136)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity6.85
▷ Minimum class complexity1.00
▷ Maximum class complexity819.00
Average method complexity2.48
▷ Minimum method complexity1.00
▷ Maximum method complexity136.00
Code structure
Namespaces22
Interfaces6
Traits7
Classes200
▷ Abstract classes105.00%
▷ Concrete classes19095.00%
▷ Final classes00.00%
Methods843
▷ Static methods15718.62%
▷ Public methods77892.29%
▷ Protected methods283.32%
▷ Private methods374.39%
Functions58
▷ Named functions5086.21%
▷ Anonymous functions813.79%
Constants729
▷ Global constants567.68%
▷ Class constants67392.32%
▷ Public constants673100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
73 PNG files occupy 3.25MB with 0.83MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
cards/box/08_title.png1.20KB1.20KB0.00%
cards/adventure/06_image.png187.56KB189.26KB0.00%
rezgo/templates/default/img/ticketguardian/TOURS-curv-logo.png3.49KB1.84KB▼ 47.16%
rezgo/templates/default/img/ticketguardian/TSH-IC-7.png1.20KB0.61KB▼ 49.22%
cards/ornament/01_title.png5.50KB3.74KB▼ 31.94%