76% salon-booking-system

Code Review | Salon booking system

WordPress plugin Salon booking system scored76%from 54 tests.

About plugin

  • Plugin page: salon-booking-system
  • Plugin version: 8.8.2
  • PHP compatiblity: 7.4.8+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.4
  • WordPress version: 6.3.1
  • First release: Apr 16, 2015
  • Latest release: Nov 22, 2023
  • Number of updates: 687
  • Update frequency: every 4.6 days
  • Top authors: wordpresschef (100%)

Code review

54 tests

User reviews

175 reviews

Install metrics

6,000+ active /512,762 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲6.04MB] [CPU: ▲35.98ms] 75% from 4 tests

An overview of server-side resources used by Salon booking system
It is recommended to improve the following
  • Extra RAM: The extra memory usage must be under 5MB (currently 6.04MB on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /9.98 ▲6.5295.12 ▲52.86
Dashboard /wp-admin10.07 ▲6.7395.83 ▲28.63
Posts /wp-admin/edit.php10.07 ▲6.7299.30 ▲51.59
Add New Post /wp-admin/post-new.php10.07 ▲4.1995.45 ▲10.83
Media Library /wp-admin/upload.php10.07 ▲6.8489.19 ▲54.99

Server storage [IO: ▲65.00MB] [DB: ▲0.01MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
It is recommended to fix the following issues
  • Try to limit filesystem usage to 25MB (currently using 65.00MB)
Filesystem: 2,567 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Salon booking system: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,652 ▼1,08410.72 ▼3.531.37 ▼0.2122.60 ▼26.92
Dashboard /wp-admin1,044 ▼1,1331.98 ▼3.6342.09 ▼56.8749.35 ▲3.04
Posts /wp-admin/edit.php1,041 ▼1,0591.91 ▼0.0530.84 ▼8.0652.74 ▲15.00
Add New Post /wp-admin/post-new.php1,041 ▼4851.84 ▼21.2728.79 ▼621.7747.29 ▼11.30
Media Library /wp-admin/upload.php1,041 ▼3621.93 ▼2.2531.23 ▼70.3546.82 ▲5.09

Uninstaller [IO: ▲65.00MB] [DB: ▲0.01MB] 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 has failed uninstalling correctly, leaving 2,567 files (65.00MB) in the plugin directory
    • (new file) bitbucket-pipelines.yml
    • (new file) css/admin-working.css
    • (new file) LICENSE
    • (new file) _install_data.php
    • (new file) css/admin-rtl.css
    • (new file) css/admin--salon-icon.css
    • (new file) CountryCodes.json
    • (new file) css/admin-disable-delete-permanently.css
    • (new file) css/admin-original_scss.css
    • (new file) css/admin--google-icon.css
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 14× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/salon-booking-system/views/discount/metabox/_discount_head.php
    • > /wp-content/plugins/salon-booking-system/views/metabox/_attendant_head.php
    • > /wp-content/plugins/salon-booking-system/views/shortcode/_errors_area.php
    • > /wp-content/plugins/salon-booking-system/js/events.json.php
    • > /wp-content/plugins/salon-booking-system/views/discount/metabox/_booking_total_amount_row.php
    • > /wp-content/plugins/salon-booking-system/views/metabox/_booking_head.php
    • > /wp-content/plugins/salon-booking-system/views/admin/help.php
    • > /wp-content/plugins/salon-booking-system/src/SLN/Third/mixpanel/vendor/mixpanel/mixpanel-php/examples/error_handling.php
    • > /wp-content/plugins/salon-booking-system/views/metabox/_resource_head.php
    • > /wp-content/plugins/salon-booking-system/views/mail/template.php
  • 972× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\TaskQueueInterface' not found in wp-content/plugins/salon-booking-system/src/SLN/Third/google-api-php-client/vendor/guzzlehttp/promises/src/TaskQueue.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/salon-booking-system/src/SLN/Third/google-api-php-client/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php:21
    • > PHP Warning
      Use of undefined constant SLN_PLUGIN_URL - assumed 'SLN_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/salon-booking-system/views/mail/weekly_report/_summary_total.php on line 4
    • > PHP Notice
      Undefined variable: helper in wp-content/plugins/salon-booking-system/views/metabox/attendant.php on line 2
    • > [ Base_MixpanelBase - line 76 ]
      Using token: MIXPANEL_PROJECT_TOKEN
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/salon-booking-system/views/mail/weekly_report/_top_spenders_customers.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Exception' not found in wp-content/plugins/salon-booking-system/src/SLN/Third/google-api-php-client/src/Task/Exception.php:22
    • > PHP Notice
      Undefined variable: service in wp-content/plugins/salon-booking-system/views/shortcode/_services_item_400.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Model' not found in wp-content/plugins/salon-booking-system/src/SLN/Third/google-api-php-client/vendor/google/apiclient-services/src/Calendar/EventAttachment.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Crypt\\EC\\BaseCurves\\Prime' not found in wp-content/plugins/salon-booking-system/src/SLN/Third/google-api-php-client/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP192t1.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: You are using too many tags: 18 tag instead of maximum 10
  • Screenshots: These screenshots require images: #10 (screenshot-10.jpg), #11 (screenshot-11.jpg)
You can take inspiration from this readme.txt

salon-booking-system/salon.php 92% from 13 tests

The main PHP file in "Salon booking system" ver. 8.8.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("salon-booking-system.php" instead of "salon.php")

Code Analysis 95% from 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 detected663,589 lines of code in 2,129 files:
LanguageFilesBlank linesComment linesLines of code
PO File122111,962201,776265,343
PHP1,36429,36362,158163,412
CSS773,8812,362143,687
JavaScript3252,9022,37931,488
SVG2443229,885
HTML651,84419112,931
Markdown472,25406,517
Vuejs Component2412084,588
JSON35103,650
Sass362691,308
YAML19614366
EJS11222168
XML740118
Python1222577
Mustache15027
Dockerfile18010
make1409
Bourne Shell2205

PHP code 0% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,073)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity17.47
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity3.35
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces100
Interfaces43
Traits12
Classes1,040
▷ Abstract classes23522.60%
▷ Concrete classes80577.40%
▷ Final classes425.22%
Methods7,620
▷ Static methods1,23216.17%
▷ Public methods5,90177.44%
▷ Protected methods6788.90%
▷ Private methods1,04113.66%
Functions433
▷ Named functions19745.50%
▷ Anonymous functions23654.50%
Constants906
▷ Global constants16518.21%
▷ Class constants74181.79%
▷ Public constants73899.60%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
98 PNG files occupy 1.34MB with 0.54MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/email/calendar-google-48.png0.54KB0.37KB▼ 31.60%
img/checkboxes-bkg.png1.64KB0.54KB▼ 67.30%
js/bootstrap-colorpicker/img/bootstrap-colorpicker/hue.png0.49KB0.50KB0.00%
src/SLB_PWA/pwa/public/img/icons/apple-touch-icon.png8.48KB3.64KB▼ 57.11%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%