10% easync-booking

Code Review | Free Booking Plugin for Hotels, Restaurant and Car Rental - eaSYNC

WordPress plugin Free Booking Plugin for Hotels, Restaurant and Car Rental - eaSYNC scored10%from 54 tests.

About plugin

  • Plugin page: easync-booking
  • Plugin version: 1.3.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Feb 18, 2019
  • Latest release: Sep 8, 2023
  • Number of updates: 191
  • Update frequency: every 8.7 days
  • Top authors: syntactics (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

300+ active /28,571 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/easync-booking/easync.php+878
    session_start(): A session had already been started - ignoring

Server metrics [RAM: ▼1.95MB] [CPU: ▼44.08ms] Passed 4 tests

This is a short check of server-side resources used by Free Booking Plugin for Hotels, Restaurant and Car Rental - eaSYNC
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.04 ▼1.4212.88 ▼28.51
Dashboard /wp-admin2.06 ▼1.2515.40 ▼35.04
Posts /wp-admin/edit.php2.06 ▼1.3016.08 ▼30.57
Add New Post /wp-admin/post-new.php2.06 ▼3.8314.72 ▼82.18
Media Library /wp-admin/upload.php2.06 ▼1.1721.98 ▼9.40
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius2.0615.89

Server storage [IO: ▲12.68MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 1,003 new files
Database: 7 new tables, 10 new options
New tables
wp_sync_restau_tables
wp_sync_restau_entries
wp_sync_payments
wp_sync_hotel_entries
wp_sync_cancel_requests
wp_sync_rent_car_entries
wp_sync_options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
fs_debug_mode
fs_accounts
db_upgraded
fs_active_plugins
jal_db_version
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Free Booking Plugin for Hotels, Restaurant and Car Rental - eaSYNC
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,950 ▲21513.64 ▼1.116.51 ▲4.4628.19 ▼19.50
Dashboard /wp-admin2,235 ▲445.86 ▲0.95113.63 ▲1.0186.67 ▲34.75
Posts /wp-admin/edit.php2,145 ▲562.20 ▲0.1944.18 ▲7.7836.00 ▼0.46
Add New Post /wp-admin/post-new.php1,544 ▲1121.89 ▼1.27748.51 ▲161.5452.87 ▲2.06
Media Library /wp-admin/upload.php1,429 ▲384.21 ▲0.02105.14 ▲10.7988.21 ▲47.64
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,1091.9132.7626.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/easync-booking/easync.php+878
    session_start(): A session had already been started - ignoring
  • This plugin does not fully uninstall, leaving 7 tables in the database
    • wp_sync_payments
    • wp_sync_options
    • wp_sync_cancel_requests
    • wp_sync_restau_entries
    • wp_sync_rent_car_entries
    • wp_sync_restau_tables
    • wp_sync_hotel_entries
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • jal_db_version
    • fs_active_plugins
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • fs_debug_mode
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • fs_accounts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Notice in wp-content/plugins/easync-booking/easync.php+878
    session_start(): A session had already been started - ignoring
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Notice in wp-content/plugins/easync-booking/easync.php+5169
    Undefined offset: 0
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Notice in wp-content/plugins/easync-booking/easync.php+5169
    Trying to get property 'option_value' of non-object

SRP 0% from 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
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/easync-booking/forms/car-rental/search-car.php
  • 355× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/easync-booking/lib/CreditNote.php:40
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/easync-booking/lib/ApplePayDomain.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'net\\authorize\\api\\controller\\base\\ApiOperationBase' not found in wp-content/plugins/easync-booking/forms/sdk-php-master/lib/net/authorize/api/controller/SecurePaymentContainerController.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/easync-booking/lib/Service/SourceService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'net\\authorize\\api\\contract\\v1\\ProfileTransAmountType' not found in wp-content/plugins/easync-booking/forms/sdk-php-master/lib/net/authorize/api/contract/v1/ProfileTransRefundType.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'net\\authorize\\api\\contract\\v1\\ANetApiResponseType' not found in wp-content/plugins/easync-booking/forms/sdk-php-master/lib/net/authorize/api/contract/v1/GetCustomerProfileResponse.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/easync-booking/lib/Customer.php:41
    • > PHP Fatal error
      Uncaught Error: Class 'net\\authorize\\api\\controller\\base\\ApiOperationBase' not found in wp-content/plugins/easync-booking/forms/sdk-php-master/lib/net/authorize/api/controller/ARBGetSubscriptionStatusController.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'net\\authorize\\api\\controller\\base\\ApiOperationBase' not found in wp-content/plugins/easync-booking/forms/sdk-php-master/lib/net/authorize/api/controller/DeleteCustomerShippingAddressController.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/easync-booking/lib/BitcoinTransaction.php:16

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 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add descriptions for screenshots #5, #6, #7 in easync-booking/assets to your readme.txt
  • Requires php: Invalid version format
Please take inspiration from this readme.txt

easync-booking/easync.php 92% from 13 tests

The main PHP script in "Free Booking Plugin for Hotels, Restaurant and Car Rental - eaSYNC" version 1.3.8 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("easync-booking.php" instead of "easync.php")

Code Analysis 97% from 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 detected141,525 lines of code in 931 files:
LanguageFilesBlank linesComment linesLines of code
PHP64416,16140,92279,870
JavaScript272,87318,30340,890
YAML220108,880
CSS301,0765037,449
XSD1468893,974
Markdown21110349
JSON41074
XML19337
SVG2002

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity16.24
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity2.81
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces40
Interfaces10
Traits7
Classes526
▷ Abstract classes132.47%
▷ Concrete classes51397.53%
▷ Final classes00.00%
Methods4,196
▷ Static methods3598.56%
▷ Public methods3,68287.75%
▷ Protected methods992.36%
▷ Private methods4159.89%
Functions418
▷ Named functions23355.74%
▷ Anonymous functions18544.26%
Constants919
▷ Global constants10110.99%
▷ Class constants81889.01%
▷ Public constants818100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
24 PNG files occupy 0.09MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-icons_777620_256x240.png4.57KB4.18KB▼ 8.43%
css/images/ui-icons_555555_256x240.png6.91KB4.18KB▼ 39.47%
images/sort_asc.png0.40KB0.24KB▼ 40.05%
images/sunrise.png1.13KB0.89KB▼ 21.81%
images/sort_desc.png0.38KB0.22KB▼ 42.53%