78% booking-sms

Code Review | Booking Calendar - Clockwork SMS

WordPress plugin Booking Calendar - Clockwork SMS scored78%from 54 tests.

About plugin

  • Plugin page: booking-sms
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.4.0
  • WordPress version: 6.3.1
  • First release: Oct 17, 2012
  • Latest release: Jan 5, 2018
  • Number of updates: 23
  • Update frequency: every 83.1 days
  • Top authors: jamesinman (39.13%)mediaburst (34.78%)martinsteel (34.78%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,138 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼10.68ms] Passed 4 tests

This is a short check of server-side resources used by Booking Calendar - Clockwork SMS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.07 ▼2.08
Dashboard /wp-admin3.36 ▲0.0147.42 ▼23.30
Posts /wp-admin/edit.php3.47 ▲0.1150.64 ▲1.45
Add New Post /wp-admin/post-new.php5.96 ▲0.0791.38 ▼18.77
Media Library /wp-admin/upload.php3.28 ▲0.0544.20 ▲3.65
Test /wp-admin/admin.php?page=clockwork_test_message3.2835.36
Clockwork Options /wp-admin/admin.php?page=clockwork_options3.2832.60
Booking Calendar /wp-admin/admin.php?page=clockwork_booking_calendar3.2835.37

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Booking Calendar - Clockwork SMS
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲9113.66 ▼0.571.64 ▲0.0541.85 ▲0.30
Dashboard /wp-admin2,240 ▲495.87 ▲0.01108.74 ▲0.8284.98 ▲41.33
Posts /wp-admin/edit.php2,128 ▲422.01 ▲0.0037.98 ▲3.3337.49 ▲2.64
Add New Post /wp-admin/post-new.php1,700 ▲18622.62 ▲4.97730.43 ▲16.4261.92 ▼5.86
Media Library /wp-admin/upload.php1,419 ▲344.11 ▼0.12102.05 ▼16.9551.98 ▲1.11
Test /wp-admin/admin.php?page=clockwork_test_message8442.3427.9529.03
Clockwork Options /wp-admin/admin.php?page=clockwork_options8791.6827.1128.39
Booking Calendar /wp-admin/admin.php?page=clockwork_booking_calendar9762.0730.8840.65

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% 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)
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=clockwork_test_message
    • > Notice in wp-content/plugins/booking-sms/templates/clockwork-test-message.php+8
    Undefined index: to

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
Almost there! Just fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Clockwork' not found in wp-content/plugins/booking-sms/lib/clockwork/class-WordPressClockwork.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/booking-sms/booking-calendar-sms.php:74
    • > PHP Fatal error
      Uncaught Error: Class 'Clockwork_Plugin' not found in wp-content/plugins/booking-sms/main.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (SMS settings) image not found
The official readme.txt is a good inspiration

booking-sms/booking-calendar-sms.php 92% from 13 tests

The main PHP script in "Booking Calendar - Clockwork SMS" version 1.1.3 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("booking-sms.php" instead of "booking-calendar-sms.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin1,346 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP92726671,298
CSS14025
JavaScript19323

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity34.40
▷ Minimum class complexity1.00
▷ Maximum class complexity70.00
Average method complexity3.98
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes240.00%
▷ Concrete classes360.00%
▷ Final classes00.00%
Methods59
▷ Static methods11.69%
▷ Public methods4983.05%
▷ Protected methods915.25%
▷ Private methods11.69%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants00.00%
▷ Class constants13100.00%
▷ Public constants13100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.19MB with 0.11MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo_16px_16px.png0.43KB0.31KB▼ 27.56%
images/logo_32px_32px.png0.76KB0.45KB▼ 40.95%
images/badrobot.png92.94KB10.20KB▼ 89.03%
screenshot-1.png99.09KB32.43KB▼ 67.27%