57% professional-booking-management

Code Review | Professional Booking Management

WordPress plugin Professional Booking Management scored57%from 54 tests.

About plugin

  • Plugin page: professional-book...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.4-4.5
  • WordPress version: 6.3.1
  • First release: Apr 28, 2016
  • Latest release: Apr 30, 2016
  • Number of updates: 12
  • Update frequency: every 0.6 days
  • Top authors: Fitsoft (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,233 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼4.82ms] Passed 4 tests

An overview of server-side resources used by Professional Booking Management
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0446.28 ▼9.63
Dashboard /wp-admin3.41 ▲0.1147.46 ▼8.83
Posts /wp-admin/edit.php3.52 ▲0.1750.78 ▲0.59
Add New Post /wp-admin/post-new.php5.99 ▲0.1098.47 ▼1.34
Media Library /wp-admin/upload.php3.33 ▲0.1036.28 ▲0.52
Booking Management /wp-admin/options-general.php?page=myprobooking-setting-admin3.2729.44

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 28 new files
Database: 1 new table, 6 new options
New tables
wp_myprobooking
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Professional Booking Management
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲18613.60 ▼0.799.31 ▲7.6638.97 ▼10.10
Dashboard /wp-admin2,226 ▲384.85 ▼1.01107.64 ▲1.1739.86 ▼3.21
Posts /wp-admin/edit.php2,109 ▲202.00 ▲0.0237.67 ▼0.7837.95 ▲1.74
Add New Post /wp-admin/post-new.php1,530 ▼317.39 ▼5.92690.15 ▲24.1453.59 ▼1.46
Media Library /wp-admin/upload.php1,411 ▲234.23 ▼0.0097.55 ▼8.4346.05 ▲0.02
Booking Management /wp-admin/options-general.php?page=myprobooking-setting-admin8142.1726.3929.60

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_myprobooking
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=myprobooking-setting-admin
    • > Notice in wp-content/plugins/professional-booking-management/booking-management-options.php+192
    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
The following issues need your attention
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/professional-booking-management/booking-management-options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/professional-booking-management/booking-management-buttons.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/professional-booking-management/1.0.0/booking-management-common.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/professional-booking-management/1.0.0/booking-management.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/professional-booking-management/booking-management-common.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/professional-booking-management/1.0.0/booking-management-buttons.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/professional-booking-management/1.0.0/booking-management-options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/professional-booking-management/booking-management.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

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
Attributes that need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can take inspiration from this readme.txt

professional-booking-management/booking-management.php 77% from 13 tests

"Professional Booking Management" version 1.0.0'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:
  • Description: Keep the plugin description shorter than 140 characters (currently 305 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("professional-booking-management.php" instead of "booking-management.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
It is important to fix the following items
  • For security reasons, never distribute binary or executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/professional-booking-management/1.0.0/certs/-.myprobooking.crt
      • wp-content/plugins/professional-booking-management/certs/-.myprobooking.crt
541 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5111129486
JavaScript1122555

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity50.00
▷ Minimum class complexity50.00
▷ Maximum class complexity50.00
Average method complexity3.72
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods36
▷ Static methods00.00%
▷ Public methods2261.11%
▷ Protected methods00.00%
▷ Private methods1438.89%
Functions30
▷ Named functions30100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
12 PNG files occupy 0.17MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
1.0.0/editorbtn/mpbbookingschedulecmd.png18.29KB0.88KB▼ 95.18%
1.0.0/editorbtn/mpbcalendar.png14.96KB0.71KB▼ 95.28%
images/accountbtn.png13.45KB4.22KB▼ 68.65%
1.0.0/images/accountbtn.png13.45KB4.22KB▼ 68.65%
1.0.0/editorbtn/mpbsignup.png15.08KB0.90KB▼ 94.05%