74% emsb-service-booking

Code Review | Doctor Appointment Booking Plugin - EMSB

WordPress plugin Doctor Appointment Booking Plugin - EMSB scored74%from 54 tests.

About plugin

  • Plugin page: emsb-service-booking
  • Plugin version: 1.2.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.5
  • WordPress version: 6.3.1
  • First release: Feb 6, 2020
  • Latest release: Aug 20, 2020
  • Number of updates: 20
  • Update frequency: every 10.0 days
  • Top authors: emsbservicebooking (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /5,192 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.13MB] [CPU: ▲5.71ms] Passed 4 tests

Server-side resources used by Doctor Appointment Booking Plugin - EMSB
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1142.91 ▲1.99
Dashboard /wp-admin3.42 ▲0.1255.57 ▲10.20
Posts /wp-admin/edit.php3.52 ▲0.1653.86 ▲3.25
Add New Post /wp-admin/post-new.php6.09 ▲0.21118.57 ▲32.94
Media Library /wp-admin/upload.php3.35 ▲0.1242.37 ▲7.38
Settings /wp-admin/admin.php?page=emsb_admin_settings_page3.3236.31
Dashboard /wp-admin/admin.php?page=emsb_admin_page3.3236.12
All Bookings /wp-admin/admin.php?page=emsb_admin_bookings_page3.3237.87
Add Service /wp-admin/post-new.php?post_type=emsb_service3.4880.91
All Services /wp-admin/edit.php?post_type=emsb_service3.3740.42

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 88 new files
Database: 2 new tables, 6 new options
New tables
wp_emsb_bookings
wp_emsb_settings
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Doctor Appointment Booking Plugin - EMSB
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,853 ▲1,08215.58 ▲0.8313.78 ▲11.8924.80 ▼20.62
Dashboard /wp-admin2,579 ▲3945.79 ▼0.09127.01 ▲23.7547.43 ▲7.85
Posts /wp-admin/edit.php2,458 ▲3692.68 ▲0.6759.94 ▲20.0842.43 ▲6.25
Add New Post /wp-admin/post-new.php2,021 ▲48824.08 ▲0.85697.31 ▲24.6841.79 ▼8.72
Media Library /wp-admin/upload.php1,750 ▲3655.11 ▲0.91120.20 ▲18.8759.39 ▲13.07
Settings /wp-admin/admin.php?page=emsb_admin_settings_page1,4312.4747.0051.97
Dashboard /wp-admin/admin.php?page=emsb_admin_page1,2762.4349.2042.67
All Bookings /wp-admin/admin.php?page=emsb_admin_bookings_page1,3372.5045.1738.49
Add Service /wp-admin/post-new.php?post_type=emsb_service3,1727.49174.87125.05
All Services /wp-admin/edit.php?post_type=emsb_service1,5102.7145.4339.95

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% 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
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_emsb_bookings
    • wp_emsb_settings
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Please fix the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/emsb-service-booking/archive-emsb_service.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/emsb-service-booking/emsb-ajax-calls.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/emsb-service-booking/emsb-service-booking-admin.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/emsb-service-booking/single-emsb_service.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: Too many tags (30 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

emsb-service-booking/emsb-service-booking.php 92% from 13 tests

The primary PHP file in "Doctor Appointment Booking Plugin - EMSB" version 1.2.2 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 175 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected20,103 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
CSS114621046,962
SVG8003,277
Stylus2712,937
JavaScript83862082,577
PHP6439852,218
Sass519201,811
PO File1134149320
JSON1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity17.20
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity3.61
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods31
▷ Static methods1238.71%
▷ Public methods2993.55%
▷ Protected methods26.45%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/service-booking-blue.png35.51KB13.44KB▼ 62.14%
assets/public/css/chosen-sprite@2x.png.png0.50KB0.42KB▼ 15.37%
assets/css/chosen-sprite.png0.50KB0.42KB▼ 15.37%
assets/img/service-booking.png27.65KB13.37KB▼ 51.64%
assets/public/css/chosen-sprite.png0.50KB0.42KB▼ 15.37%