10% online-appointment-scheduling-software

Code Review | Swift Calendar Online Appointment Scheduling

WordPress plugin Swift Calendar Online Appointment Scheduling scored10%from 54 tests.

About plugin

  • Plugin page: online-appointmen...
  • Plugin version: 1.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.2
  • WordPress version: 6.3.1
  • First release: Dec 12, 2015
  • Latest release: Jun 20, 2019
  • Number of updates: 28
  • Update frequency: every 72.9 days
  • Top authors: SwiftCloud (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,668 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/online-appointment-scheduling-software/section/scal-call-to-action-front.php+21
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.65MB] [CPU: ▼54.32ms] Passed 4 tests

Server-side resources used by Swift Calendar Online Appointment Scheduling
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.35 ▼1.128.24 ▼30.14
Dashboard /wp-admin2.37 ▼0.989.05 ▼50.48
Posts /wp-admin/edit.php2.37 ▼0.9910.48 ▼41.67
Add New Post /wp-admin/post-new.php2.37 ▼3.5210.42 ▼94.98
Media Library /wp-admin/upload.php2.37 ▼0.8612.44 ▼22.16
All Events /wp-admin/edit.php?post_type=event_marketing2.3710.77
Updates & Tips /wp-admin/admin.php?page=scal_dashboard2.3710.00
Categories /wp-admin/edit-tags.php?taxonomy=event_marketing_category&post_type=event_marketing2.3710.87
Settings /wp-admin/admin.php?page=scal_control_panel2.379.56
Add New Event /wp-admin/post-new.php?post_type=event_marketing2.3710.40
Call to Action /wp-admin/admin.php?page=scal_call_to_action2.3710.68

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 89 new files
Database: no new tables, 10 new options
New WordPress options
db_upgraded
swift_calendar_db_version
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
scal_event_flag
theysaidso_admin_options
widget_scal_upcoming_events
can_compress_scripts
event_marketing_category_children

Browser metrics Passed 4 tests

An overview of browser requirements for Swift Calendar Online Appointment Scheduling
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,070 ▲32414.04 ▼0.578.36 ▲6.6533.48 ▼9.05
Dashboard /wp-admin2,319 ▲1345.25 ▼0.54113.14 ▲12.7491.24 ▲49.53
Posts /wp-admin/edit.php2,225 ▲1362.54 ▲0.5640.77 ▲1.1345.13 ▲9.17
Add New Post /wp-admin/post-new.php1,619 ▲7723.54 ▲5.29711.01 ▲105.0040.12 ▼3.90
Media Library /wp-admin/upload.php1,504 ▲1134.66 ▲0.45104.96 ▲7.9197.07 ▲53.00
All Events /wp-admin/edit.php?post_type=event_marketing1,1942.3435.0238.65
Updates & Tips /wp-admin/admin.php?page=scal_dashboard1,0342.2631.5443.89
Categories /wp-admin/edit-tags.php?taxonomy=event_marketing_category&post_type=event_marketing1,7682.3231.4444.74
Settings /wp-admin/admin.php?page=scal_control_panel2,1697.47143.02104.56
Add New Event /wp-admin/post-new.php?post_type=event_marketing2,8788.10167.61135.40
Call to Action /wp-admin/admin.php?page=scal_call_to_action1,8797.31140.1197.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/online-appointment-scheduling-software/section/scal-call-to-action-front.php+21
    Trying to access array offset on value of type bool
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_recent-posts
    • scal_event_flag
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_scal_upcoming_events
    • event_marketing_category_children

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 27 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=scal_call_to_action
    • > Notice in wp-content/plugins/online-appointment-scheduling-software/admin/section/scal_call_to_action.php+144
    Trying to access array offset on value of type bool

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 take a closer look at the following
  • 19× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/online-appointment-scheduling-software/section/scal-function.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/online-appointment-scheduling-software/section/scal-call-to-action-front.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/online-appointment-scheduling-software/admin/section/scal_widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/online-appointment-scheduling-software/section/scal-shortcodes.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/online-appointment-scheduling-software/admin/section/sca_general_settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/online-appointment-scheduling-software/admin/section/scal_settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/online-appointment-scheduling-software/admin/section/swift_dashboard.php:187
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/online-appointment-scheduling-software/swift-calendar.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/online-appointment-scheduling-software/admin/section/cpt_event_marketing.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/online-appointment-scheduling-software/section/single-event_marketing.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=scal_control_panel
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot create property 'guid' on number '80'" "TypeError: Cannot create property 'guid' on number '80'\n at Object.add (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:37795)\n at Object.\u003Canonymous> (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:5:9827)\n at e.\u003Ccomputed> [as add] (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:5:1582)\n at HTMLInputElement.\u003Canonymous> (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:37080)\n at Function.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:3129)\n at e.\u003Ccomputed>.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:1594)\n at Le (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:37055)\n at Le (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:36780)\n at e.\u003Ccomputed>.on (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:44440)\n at HTMLDocument.\u003Canonymous> (/wp-admin/admin.php?page=scal_control_panel:200:46)" undefined
    • > GET request to /wp-admin/admin.php?page=scal_control_panel
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:37794 Uncaught TypeError: Cannot create property 'guid' on number '80'

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots require images: #2 (Popup example), #3 (Call To Action for Inbound Marketing example with marketing bait)
You can take inspiration from this readme.txt

online-appointment-scheduling-software/swift-calendar.php 77% from 13 tests

"Swift Calendar Online Appointment Scheduling" version 1.3.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("online-appointment-scheduling-software.php" instead of "swift-calendar.php")
  • 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
  • Description: Keep the plugin description shorter than 140 characters (currently 341 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
There were no executable files found in this plugin16,854 lines of code in 63 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript181,7771,4449,949
CSS161541364,197
PHP193612402,329
LESS6280176
Markdown138099
make120064
JSON20040

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity11.00
▷ Minimum class complexity7.00
▷ Maximum class complexity15.00
Average method complexity3.22
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods888.89%
▷ Protected methods00.00%
▷ Private methods111.11%
Functions42
▷ Named functions4095.24%
▷ Anonymous functions24.76%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
22 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/close.png1.80KB1.76KB▼ 2.33%
admin/css/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
admin/css/images/ui-bg_flat_10_000000_40x100.png0.20KB0.08KB▼ 57.56%
admin/css/images/ui-icons_ef8c08_256x240.png4.44KB4.17KB▼ 6.02%
admin/images/swiftcloud-20X34.png1.49KB0.88KB▼ 41.02%