68% bookingflow-smoobu-for-wp

Code Review | bookingflow Smoobu for WP

WordPress plugin bookingflow Smoobu for WP scored68%from 54 tests.

About plugin

  • Plugin page: bookingflow-smoob...
  • Plugin version: 1.2.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5
  • WordPress version: 6.3.1
  • First release: Jun 9, 2020
  • Latest release: Aug 12, 2020
  • Number of updates: 8
  • Update frequency: every 11.3 days
  • Top authors: netpadrino (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /1,901 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 gracefully, with no errors

Server metrics [RAM: ▼0.44MB] [CPU: ▼17.78ms] Passed 4 tests

This is a short check of server-side resources used by bookingflow Smoobu for WP
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2343.17 ▼3.28
Dashboard /wp-admin3.60 ▲0.2552.98 ▼14.17
Posts /wp-admin/edit.php3.65 ▲0.2952.69 ▲6.42
Add New Post /wp-admin/post-new.php3.41 ▼2.4844.57 ▼60.09
Media Library /wp-admin/upload.php3.46 ▲0.2343.24 ▲9.38
Webhook /wp-admin/admin.php?page=smoobu-calendar-settings-webhook3.4336.47
FAQ /wp-admin/admin.php?page=smoobu-calendar-settings-faq3.4340.13
General Settings /wp-admin/admin.php?page=smoobu-calendar-settings3.4336.04
Data Renewal /wp-admin/admin.php?page=smoobu-calendar-settings-renewal3.4335.86
Styling /wp-admin/admin.php?page=smoobu-calendar-settings-styling3.4540.01
My Properties /wp-admin/admin.php?page=smoobu-calendar-settings-properties3.4335.81

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 57 new files
Database: 1 new table, 7 new options
New tables
wp_smoobu_calendar_availability
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_smoobu_calendar_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by bookingflow Smoobu for WP
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,867 ▲10613.48 ▼0.731.61 ▼0.1541.64 ▼1.05
Dashboard /wp-admin2,276 ▲964.98 ▼0.6299.00 ▲0.6542.79 ▼2.08
Posts /wp-admin/edit.php2,186 ▲862.50 ▲0.4942.13 ▲0.8037.08 ▲1.76
Add New Post /wp-admin/post-new.php6,261 ▲4,73318.97 ▼4.13928.69 ▲324.6839.66 ▼20.01
Media Library /wp-admin/upload.php1,478 ▲784.61 ▲0.45104.01 ▲0.2043.08 ▼2.86
Webhook /wp-admin/admin.php?page=smoobu-calendar-settings-webhook8902.0927.6027.16
FAQ /wp-admin/admin.php?page=smoobu-calendar-settings-faq1,2012.6340.0230.54
General Settings /wp-admin/admin.php?page=smoobu-calendar-settings9152.0928.3825.37
Data Renewal /wp-admin/admin.php?page=smoobu-calendar-settings-renewal8852.1229.3625.15
Styling /wp-admin/admin.php?page=smoobu-calendar-settings-styling2,9194.24106.7241.64
My Properties /wp-admin/admin.php?page=smoobu-calendar-settings-properties9412.1128.8831.91

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_smoobu_calendar_availability
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_smoobu_calendar_widget
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 19× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/bookingflow-smoobu-for-wp/classes/api/class-smoobu-api.php
    • > /wp-content/plugins/bookingflow-smoobu-for-wp/views/admin/loop/faq.php
    • > /wp-content/plugins/bookingflow-smoobu-for-wp/smoobu-calendar.php
    • > /wp-content/plugins/bookingflow-smoobu-for-wp/classes/class-smoobu-calendar.php
    • > /wp-content/plugins/bookingflow-smoobu-for-wp/views/admin/settings/general.php
    • > /wp-content/plugins/bookingflow-smoobu-for-wp/classes/shortcodes/class-smoobu-calendar-shortcode.php
    • > /wp-content/plugins/bookingflow-smoobu-for-wp/views/admin/settings/parts/notice.php
    • > /wp-content/plugins/bookingflow-smoobu-for-wp/views/admin/settings/renewal.php
    • > /wp-content/plugins/bookingflow-smoobu-for-wp/classes/class-smoobu-blocks.php
    • > /wp-content/plugins/bookingflow-smoobu-for-wp/classes/api/class-smoobu-api-properties.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/bookingflow-smoobu-for-wp/constants.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bookingflow-smoobu-for-wp/classes/widgets/class-smoobu-calendar-widget.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/bookingflow-smoobu-for-wp/views/calendar.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: booking plugin, smoobu, booking calendar, property booking

bookingflow-smoobu-for-wp/smoobu-calendar.php 85% from 13 tests

This is the main PHP file of "bookingflow Smoobu for WP" version 1.2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bookingflow-smoobu-for-wp.php" instead of "smoobu-calendar.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected3,042 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP243417461,664
CSS6124141733
JavaScript65214267
PO File19091259
Sass117096
JSON10023

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity11.17
▷ Minimum class complexity2.00
▷ Maximum class complexity32.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes433.33%
Methods71
▷ Static methods2433.80%
▷ Public methods6084.51%
▷ Protected methods00.00%
▷ Private methods1115.49%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
12 PNG files occupy 0.32MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/webhook-instruction-1.png22.75KB7.98KB▼ 64.92%
assets/screenshot-2.png62.51KB27.02KB▼ 56.78%
assets/screenshot-5.png37.61KB19.13KB▼ 49.12%
assets/screenshot-1.png58.66KB25.42KB▼ 56.66%
assets/css/default/images/arrow-right.png0.31KB0.21KB▼ 32.08%