10% book-in-60

Code Review | Book in 60

WordPress plugin Book in 60 scored10%from 54 tests.

About plugin

  • Plugin page: book-in-60
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Jul 5, 2022
  • Latest release: Jul 5, 2022
  • Number of updates: 2
  • Update frequency: every 5.5 days
  • Top authors: lessterm (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /698 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/book-in-60/include/b60-main.php+57
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲3.41MB] [CPU: ▲17.42ms] Passed 4 tests

An overview of server-side resources used by Book in 60
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /6.86 ▲3.3962.24 ▲22.91
Dashboard /wp-admin6.72 ▲3.4262.53 ▲15.28
Posts /wp-admin/edit.php6.77 ▲3.4264.54 ▲16.00
Add New Post /wp-admin/post-new.php9.33 ▲3.45114.09 ▲15.49
Media Library /wp-admin/upload.php6.65 ▲3.4259.69 ▲27.31
Bookings /wp-admin/admin.php?page=b60-bookings6.7347.67
Leads /wp-admin/admin.php?page=b60-leads6.7450.09
Settings /wp-admin/admin.php?page=b60-settings6.7047.27
Service Addons /wp-admin/edit.php?post_type=service_addons6.6749.59
Services /wp-admin/edit.php?post_type=service6.6748.01
Service Frequency /wp-admin/edit.php?post_type=service_frequencies6.6748.94
Pricing Parameters /wp-admin/edit.php?post_type=pricing_parameters6.6747.10

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 367 new files
Database: 3 new tables, 9 new options
New tables
wp_b60_payments
wp_b60_lead_entries
wp_b60_payment_forms
New WordPress options
theysaidso_admin_options
db_upgraded
b60_settings_option
b60_lead_formbuilder
widget_recent-comments
widget_recent-posts
can_compress_scripts
b60_booking_formbuilder
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Book in 60
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,005 ▲25913.80 ▼0.736.19 ▲4.5756.92 ▲20.24
Dashboard /wp-admin2,282 ▲1015.06 ▼0.6392.94 ▼7.8738.50 ▼2.89
Posts /wp-admin/edit.php2,187 ▲872.39 ▲0.3841.43 ▲3.0832.00 ▼3.70
Add New Post /wp-admin/post-new.php1,602 ▲7621.20 ▼1.96711.42 ▲19.8836.89 ▼15.16
Media Library /wp-admin/upload.php1,490 ▲904.67 ▲0.34103.15 ▲7.8640.03 ▼1.11
Bookings /wp-admin/admin.php?page=b60-bookings1,4106.68228.0426.19
Leads /wp-admin/admin.php?page=b60-leads1,4086.57124.8924.60
Settings /wp-admin/admin.php?page=b60-settings2,2396.6399.8339.78
Service Addons /wp-admin/edit.php?post_type=service_addons1,1862.5136.1425.29
Services /wp-admin/edit.php?post_type=service1,1782.4942.2825.17
Service Frequency /wp-admin/edit.php?post_type=service_frequencies1,1782.4834.8825.34
Pricing Parameters /wp-admin/edit.php?post_type=pricing_parameters1,1722.3834.0425.11

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 3 tables in the database
    • wp_b60_payments
    • wp_b60_payment_forms
    • wp_b60_lead_entries
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_theysaidso_widget
    • b60_lead_formbuilder
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • b60_settings_option
    • b60_booking_formbuilder
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=b60-leads
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=b60-settings
    • > Notice in wp-content/plugins/book-in-60/pages/b60_settings.php+40
    Undefined index: industry
    • > GET request to /wp-admin/admin.php?page=b60-settings
    • > Notice in wp-content/plugins/book-in-60/pages/b60_settings.php+47
    Undefined index: business_name
    • > GET request to /wp-admin/admin.php?page=b60-settings
    • > Notice in wp-content/plugins/book-in-60/pages/b60_settings.php+53
    Undefined index: email_from
    • > GET request to /wp-admin/admin.php?page=b60-settings
    • > Notice in wp-content/plugins/book-in-60/pages/b60_settings.php+62
    Undefined index: enable_payment_method
    • > GET request to /wp-admin/admin.php?page=b60-settings
    • > Notice in wp-content/plugins/book-in-60/pages/b60_settings.php+73
    Undefined index: payment_method
    • > GET request to /wp-admin/admin.php?page=b60-settings
    • > Notice in wp-content/plugins/book-in-60/pages/b60_settings.php+157
    Undefined index: enable_sales_tax
    • > GET request to /wp-admin/admin.php?page=b60-settings
    • > Notice in wp-content/plugins/book-in-60/pages/b60_settings.php+167
    Undefined index: sales_tax
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=b60-settings
    • > Notice in wp-content/plugins/book-in-60/pages/b60_settings.php+175
    Undefined index: sales_tax_applied

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 items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/book-in-60/vendor/stripe/stripe-php/build.php
    • > /wp-content/plugins/book-in-60/vendor/stripe/stripe-php/update_certs.php
  • 229× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/book-in-60/vendor/stripe/stripe-php/lib/Service/BalanceService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/book-in-60/vendor/stripe/stripe-php/lib/Payout.php:40
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/book-in-60/vendor/stripe/stripe-php/lib/Identity/VerificationSession.php:38
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/book-in-60/vendor/stripe/stripe-php/lib/Service/SetupAttemptService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/book-in-60/vendor/stripe/stripe-php/lib/SetupIntent.php:65
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Exception\\OAuth\\OAuthErrorException' not found in wp-content/plugins/book-in-60/vendor/stripe/stripe-php/lib/Exception/OAuth/InvalidGrantException.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/book-in-60/vendor/stripe/stripe-php/lib/Checkout/Session.php:63
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Exception\\ApiErrorException' not found in wp-content/plugins/book-in-60/vendor/stripe/stripe-php/lib/Exception/AuthenticationException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/book-in-60/vendor/stripe/stripe-php/lib/Service/EventService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/book-in-60/vendor/stripe/stripe-php/lib/Topup.php:32

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=b60-settings
    • > Console-api (warning) in unknown
    http://js.stripe.com/v2/?ver=6.3.1 1:748 "It looks like Stripe.js is not being loaded from https://js.stripe.com. Stripe does not support serving Stripe.js from your own domain."

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: cleaning, housekeeping, booking, maid, appointment...

book-in-60/bookin60.php 85% from 13 tests

The entry point to "Book in 60" version 1.2.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("book-in-60.php" instead of "bookin60.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
These items require your attention
  • For security reasons, never distribute binary or executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/book-in-60/vendor/stripe/stripe-php/data/ca-certificates.crt
49,606 lines of code in 300 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript256,2724,85626,379
PHP2533,4289,95215,797
CSS141,0161916,157
Markdown369501,135
JSON10048
XML10031
SVG10129
make19027
YAML1003

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity4.97
▷ Minimum class complexity1.00
▷ Maximum class complexity148.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces23
Interfaces9
Traits7
Classes218
▷ Abstract classes104.59%
▷ Concrete classes20895.41%
▷ Final classes00.00%
Methods853
▷ Static methods16819.70%
▷ Public methods77290.50%
▷ Protected methods343.99%
▷ Private methods475.51%
Functions19
▷ Named functions631.58%
▷ Anonymous functions1368.42%
Constants781
▷ Global constants101.28%
▷ Class constants77198.72%
▷ Public constants771100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
49 PNG files occupy 0.30MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/gift-card-template1.png92.07KB23.08KB▼ 74.93%
assets/img/credit-card.png0.40KB0.23KB▼ 41.73%
assets/img/safety.png1.31KB0.63KB▼ 52.23%
assets/img/Date.png0.74KB0.42KB▼ 43.95%
assets/css/images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%