10% booking-chatwing

Code Review | Plugin Name: ScheduleWing – Online Booking and Appointment Schedule

WordPress plugin Plugin Name: ScheduleWing – Online Booking and Appointment Schedulescored10%from 54 tests.

About plugin

  • Plugin page: booking-chatwing
  • Plugin version: 0.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.4-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 6, 2018
  • Latest release: Oct 5, 2018
  • Number of updates: 6
  • Update frequency: every 35.5 days
  • Top authors: tridungpham (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /994 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Compile error in wp-content/plugins/booking-chatwing/classes/DataModel.php+4
    Cannot use BookingChatwing\Object as Object because 'Object' is a special class name

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.90ms] Passed 4 tests

A check of server-side resources used by Plugin Name: ScheduleWing – Online Booking and Appointment Schedule
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0053.80 ▲8.68
Dashboard /wp-admin3.31 ▲0.0046.66 ▼5.79
Posts /wp-admin/edit.php3.36 ▲0.0046.73 ▼1.02
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.97 ▼21.95
Media Library /wp-admin/upload.php3.23 ▲0.0038.97 ▲5.17

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Plugin Name: ScheduleWing – Online Booking and Appointment Schedule
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.26 ▼0.033.92 ▲1.8549.36 ▲4.82
Dashboard /wp-admin2,198 ▲245.60 ▲0.0382.45 ▼19.1839.78 ▼6.93
Posts /wp-admin/edit.php2,100 ▼01.98 ▲0.0136.52 ▼0.9436.83 ▼2.96
Add New Post /wp-admin/post-new.php1,526 ▼323.54 ▲0.37648.58 ▼7.4255.42 ▼9.67
Media Library /wp-admin/upload.php1,400 ▲64.16 ▲0.00100.37 ▼0.7943.71 ▲2.12

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Cannot use BookingChatwing\\Object as Object because 'Object' is a special class name in wp-content/plugins/booking-chatwing/classes/DataModel.php on line 4
    • > PHP Fatal error
      Cannot use 'Object' as class name as it is reserved in wp-content/plugins/booking-chatwing/chatwing-sdk/src/BookingChatwing/Object.php on line 12
    • > PHP Fatal error
      Cannot use BookingChatwing\\Object as Object because 'Object' is a special class name in wp-content/plugins/booking-chatwing/chatwing-sdk/src/BookingChatwing/Api/Action.php on line 10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

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
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === Plugin Name: ScheduleWing – Online Booking and Appointment Schedule=== )
  • Screenshots: These screenshots require images: #1 (Login ChatWing website), #2 (Customize chatbox settings in chatwing), #3 (Get access token in chatwing.com), #4 (Insert access token in Access token textbox), #5 (Get application ID in chatwing), #6 (Insert App ID and Customize booking plugin settings), #7 (Insert Booking as widget)
You can take inspiration from this readme.txt

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

"Plugin Name: ScheduleWing – Online Booking and Appointment Schedule" version 0.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin1,437 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP263265881,413
JSON10022
CSS20122

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity9.00
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.03
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods147
▷ Static methods1510.20%
▷ Public methods12786.39%
▷ Protected methods1912.93%
▷ Private methods10.68%
Functions7
▷ Named functions457.14%
▷ Anonymous functions342.86%
Constants18
▷ Global constants1794.44%
▷ Class constants15.56%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin