66% turitop-booking-system

Code Review | TuriTop Booking System

WordPress plugin TuriTop Booking System scored66%from 54 tests.

About plugin

  • Plugin page: turitop-booking-s...
  • Plugin version: 1.0.10
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Mar 14, 2017
  • Latest release: Mar 31, 2023
  • Number of updates: 30
  • Update frequency: every 73.4 days
  • Top authors: turitop (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

700+ active /4,527 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.32MB] [CPU: ▼2.81ms] Passed 4 tests

An overview of server-side resources used by TuriTop Booking System
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3242.43 ▼4.40
Dashboard /wp-admin3.62 ▲0.3251.14 ▲1.37
Posts /wp-admin/edit.php3.74 ▲0.3852.61 ▲7.55
Add New Post /wp-admin/post-new.php6.23 ▲0.3496.20 ▼9.60
Media Library /wp-admin/upload.php3.55 ▲0.3139.54 ▲1.41
Settings /wp-admin/admin.php?page=turitop_booking_system4.0348.31
Instructions /wp-admin/admin.php?page=turitop_booking_system_instructions3.5841.49

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 102 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

TuriTop Booking System: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,882 ▲13613.32 ▼0.927.01 ▲5.3246.87 ▼8.22
Dashboard /wp-admin2,257 ▲835.14 ▼0.76105.91 ▲2.1439.72 ▼8.97
Posts /wp-admin/edit.php2,147 ▲582.39 ▲0.3341.10 ▲1.8832.25 ▼3.79
Add New Post /wp-admin/post-new.php6,399 ▲4,86628.18 ▲4.85968.05 ▲327.7737.19 ▼34.00
Media Library /wp-admin/upload.php1,433 ▲454.53 ▲0.31103.97 ▼6.4042.87 ▼0.28
Settings /wp-admin/admin.php?page=turitop_booking_system6,3218.47278.9057.95
Instructions /wp-admin/admin.php?page=turitop_booking_system_instructions1,1372.1335.0236.92

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=turitop_booking_system
    • > Notice in wp-content/plugins/turitop-booking-system/admin-settings-page/class.turitop-booking-system-settings.php+1150
    Trying to access array offset on value of type bool
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=turitop_booking_system_instructions
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
    Undefined offset: 0
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=turitop_booking_system_instructions
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
    Trying to get property 'guid' of non-object
  • 22 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=turitop_booking_system_instructions
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+221
    Trying to get property 'ID' of non-object
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=turitop_booking_system_instructions
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
    Trying to get property 'post_title' of non-object

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
Please fix the following
  • 16× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/turitop-booking-system/admin-settings-page/class.turitop-booking-system-connection.php
    • > /wp-content/plugins/turitop-booking-system/includes/class.turitop-booking-system-main.php
    • > /wp-content/plugins/turitop-booking-system/includes/class.turitop-booking-system-frontend.php
    • > /wp-content/plugins/turitop-booking-system/includes/class.turitop-booking-system-frontend-ajax.php
    • > /wp-content/plugins/turitop-booking-system/includes/blocks/class.turitop-booking-system-blocks.php
    • > /wp-content/plugins/turitop-booking-system/admin-settings-page/class.turitop-booking-system-settings-page-main.php
    • > /wp-content/plugins/turitop-booking-system/admin-settings-page/class.turitop-booking-system-settings.php
    • > /wp-content/plugins/turitop-booking-system/includes/class.turitop-booking-system-shortcodes.php
    • > /wp-content/plugins/turitop-booking-system/admin-settings-page/class.turitop-booking-system-round-trip.php
    • > /wp-content/plugins/turitop-booking-system/includes/cpt/service/class.turitop-booking-system-service-cpt.php
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/turitop-booking-system/templates/services/service_block.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/turitop-booking-system/templates/services/service_block_image_rigth.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/turitop-booking-system/templates/services/service_block_image_top_center.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/turitop-booking-system/templates/services/service_block_summary_content.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/turitop-booking-system/templates/services/service_block_image_left.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/turitop-booking-system/templates/round-trip/main.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=turitop_booking_system
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.defaultLabel is deprecated since version 5.5.0! Use wp.i18n instead.
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=turitop_booking_system
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.pick is deprecated since version 5.5.0! Use wp.i18n instead.
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=turitop_booking_system
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.clear is deprecated since version 5.5.0! Use wp.i18n instead.
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=turitop_booking_system
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.clearAriaLabel is deprecated since version 5.5.0! Use wp.i18n instead.
    • > GET request to /wp-admin/admin.php?page=turitop_booking_system_instructions
    • > Network (severe)
    wp-content/plugins/turitop-booking-system/vendor//integralwebsite/css/integralwebsite-admin-functions.css?ver=1.0.10 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: turitop, wordpress booking, booking system

turitop-booking-system/init.php 85% from 13 tests

"TuriTop Booking System" version 1.0.10's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("turitop-booking-system.php" instead of "init.php")
  • Description: The description should be shorter than 140 characters (currently 300 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected24,672 lines of code in 76 files:
LanguageFilesBlank linesComment linesLines of code
SVG40139,004
CSS181,672336,415
PHP282,5403,2996,217
JavaScript246563061,899
PO File13484401,129
XML1008

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity42.73
▷ Minimum class complexity3.00
▷ Maximum class complexity127.00
Average method complexity5.31
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods213
▷ Static methods146.57%
▷ Public methods21199.06%
▷ Protected methods20.94%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants16100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/turitop-icon.png1.16KB1.35KB0.00%