56% bdtask-booking365

Code Review | Bdtask Booking365

WordPress plugin Bdtask Booking365 scored56%from 54 tests.

About plugin

  • Plugin page: bdtask-booking365
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.2-5.7.0
  • WordPress version: 6.3.1
  • First release: Apr 3, 2019
  • Latest release: Apr 29, 2021
  • Number of updates: 5
  • Update frequency: every 151.6 days
  • Top authors: bdtask (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /946 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.14MB] [CPU: ▼1.51ms] Passed 4 tests

An overview of server-side resources used by Bdtask Booking365
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.13 ▼0.55
Dashboard /wp-admin3.47 ▲0.1749.55 ▲2.38
Posts /wp-admin/edit.php3.52 ▲0.1745.32 ▼1.54
Add New Post /wp-admin/post-new.php6.05 ▲0.1779.42 ▼5.64
Media Library /wp-admin/upload.php3.39 ▲0.1735.28 ▲1.70
Service /wp-admin/admin.php?page=msbdt_service3.4940.03
Appointment /wp-admin/admin.php?page=msbdt_appointment3.4742.27
Category /wp-admin/admin.php?page=msbdt_category3.4837.18
Email Notifications /wp-admin/admin.php?page=msbdt_email_notification3.7337.61
Settings /wp-admin/admin.php?page=msbdt_setting3.5984.23
Report /wp-admin/admin.php?page=msbdt_report3.4736.57
Schedule /wp-admin/admin.php?page=msbdt_schedule3.5139.07
Professional /wp-admin/admin.php?page=msbdt_professional3.5238.23

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 113 new files
Database: 11 new tables, 42 new options
New tables
wp_msbdt_time_slote
wp_msbdt_location
wp_msbdt_paymentcard
wp_msbdt_professional
wp_msbdt_service
wp_msbdt_organization
wp_msbdt_booking
wp_msbdt_category
wp_msbdt_remainder
wp_msbdt_template
...
New WordPress options
service_language
calender_active_color
category_language
theysaidso_admin_options
name_language
admin_edit_button_color
message_language
admin_submit_button_text_color
calender_month_text_color
avoilable_color
...

Browser metrics Passed 4 tests

An overview of browser requirements for Bdtask Booking365
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,007 ▲26114.16 ▼0.4014.38 ▲12.5743.80 ▼2.65
Dashboard /wp-admin2,273 ▲824.94 ▼0.93103.23 ▼2.8540.53 ▲1.55
Posts /wp-admin/edit.php2,156 ▲672.14 ▲0.1146.19 ▲9.1634.48 ▲0.96
Add New Post /wp-admin/post-new.php1,573 ▲4023.16 ▼0.28666.99 ▼22.3356.57 ▲4.19
Media Library /wp-admin/upload.php1,452 ▲614.26 ▲0.0599.30 ▼3.2144.48 ▲0.45
Service /wp-admin/admin.php?page=msbdt_service1,5386.2294.9442.33
Appointment /wp-admin/admin.php?page=msbdt_appointment1,4666.3387.9733.83
Category /wp-admin/admin.php?page=msbdt_category1,4986.1378.2234.51
Email Notifications /wp-admin/admin.php?page=msbdt_email_notification2,5628.73168.0138.07
Settings /wp-admin/admin.php?page=msbdt_setting4,0887.59161.7586.50
Report /wp-admin/admin.php?page=msbdt_report1,4646.2271.7241.38
Schedule /wp-admin/admin.php?page=msbdt_schedule2,0965.7186.4443.68
Professional /wp-admin/admin.php?page=msbdt_professional1,6086.3575.1338.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure failed, leaving 11 tables in the database
    • wp_msbdt_scheduler
    • wp_msbdt_service
    • wp_msbdt_organization
    • wp_msbdt_booking
    • wp_msbdt_template
    • wp_msbdt_category
    • wp_msbdt_paymentcard
    • wp_msbdt_time_slote
    • wp_msbdt_remainder
    • wp_msbdt_professional
    • ...
  • Zombie WordPress options were found after uninstall: 42 options
    • admin_edit_button_color
    • db_upgraded
    • admin_delete_button_color
    • reject_color
    • request_color
    • contact_language
    • service_language
    • avoilable_color
    • email_language
    • calender_day_text_color
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=msbdt_professional
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/bdtask-booking365/public/class-bdtaskbooking-public.php+269
    Undefined index: data
  • 30 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=msbdt_email_notification
    • > Notice in wp-content/plugins/bdtask-booking365/admin/templates/msbdt-email.php+726
    Trying to get property 'day' of non-object
  • 24 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=msbdt_email_notification
    • > Notice in wp-content/plugins/bdtask-booking365/admin/templates/msbdt-email.php+747
    Trying to get property 'hour' of non-object
  • 30 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=msbdt_email_notification
    • > Notice in wp-content/plugins/bdtask-booking365/admin/templates/msbdt-email.php+768
    Trying to get property 'minute' of non-object

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/bdtask-booking365/admin/partials/bdtaskbooking-admin-display.php
    • > /wp-content/plugins/bdtask-booking365/public/partials/bdtaskbooking-public-display.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/bdtask-booking365/admin/templates/msbdt-time-slote.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/bdtask-booking365/admin/templates/msbdt-report.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/bdtask-booking365/admin/templates/bdtask-category.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/bdtask-booking365/admin/templates/bdtask-appointment.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/bdtask-booking365/admin/templates/bdtask-service.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Msbdt_Professional' not found in wp-content/plugins/bdtask-booking365/admin/templates/bdtask-professional.php:1

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=msbdt_professional
    • > Javascript (severe) in unknown
    /wp-content/plugins/bdtask-booking365/admin/assets/js/msbdt-multidatespicker.js?ver=1.0.0 0:8151 Uncaught TypeError: Cannot read properties of undefined (reading 'multiDatesPicker')

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5, #6, #7, #8 in bdtask-booking365/assets to your readme.txt
You can take inspiration from this readme.txt

bdtask-booking365/bdtaskbooking.php 85% from 13 tests

The main PHP file in "Bdtask Booking365" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("bdtask-booking365.php" instead of "bdtaskbooking.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected26,815 lines of code in 60 files:
LanguageFilesBlank linesComment linesLines of code
CSS141,01428718,642
PHP301,0961,1086,282
JavaScript153654211,603
SVG100288

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity13.06
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods194
▷ Static methods7136.60%
▷ Public methods18997.42%
▷ Protected methods00.00%
▷ Private methods52.58%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
27 compressed PNG files occupy 0.06MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
admin/assets/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
admin/assets/images/fancybox_sprite@2x.png6.40KB5.76KB▼ 9.96%
admin/assets/images/ui-icons_888888_256x240.png4.27KB4.11KB▼ 3.78%
public/css/images/fancybox_sprite@2x.png6.40KB5.76KB▼ 9.96%