68% bookslots-simple-booking-form

Code Review | BookSlots - Simple Booking Form

WordPress plugin BookSlots - Simple Booking Form scored 68% from 54 tests.

About plugin

  • Plugin page: bookslots-simple-...
  • Plugin version: 0.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Jun 22, 2022
  • Latest release: Dec 10, 2022
  • Number of updates: 12
  • Update frequency: every 14.3 days
  • Top authors: davexpression (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 901 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.57MB] [CPU: ▼0.18ms] Passed 4 tests

This is a short check of server-side resources used by BookSlots - Simple Booking Form
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.04 ▲0.5745.53 ▼2.28
Dashboard /wp-admin3.88 ▲0.5749.06 ▼1.39
Posts /wp-admin/edit.php3.93 ▲0.5755.30 ▲9.84
Add New Post /wp-admin/post-new.php6.46 ▲0.5797.61 ▼2.77
Media Library /wp-admin/upload.php3.80 ▲0.5739.67 ▲5.73
Settings /wp-admin/admin.php?page=bookslots-settings3.7634.53
BookSlots /wp-admin/admin.php?page=bookslots3.8638.40
Employees /wp-admin/admin.php?page=bookslots-employees3.9138.14
Services /wp-admin/admin.php?page=bookslots-services3.8533.14

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 1,282 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
bookslots
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

BookSlots - Simple Booking Form: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲8914.39 ▼0.011.90 ▲0.0137.24 ▼4.05
Dashboard /wp-admin2,241 ▲565.90 ▲1.00109.81 ▲0.4042.94 ▼3.23
Posts /wp-admin/edit.php2,124 ▲352.01 ▼0.0338.76 ▲3.9035.35 ▼0.41
Add New Post /wp-admin/post-new.php1,570 ▲5018.03 ▼5.13613.10 ▼72.0552.34 ▼18.21
Media Library /wp-admin/upload.php1,426 ▲414.21 ▼0.0398.10 ▼3.9441.71 ▼5.29
Settings /wp-admin/admin.php?page=bookslots-settings1,3112.3439.6855.77
BookSlots /wp-admin/admin.php?page=bookslots1,6482.5048.1530.25
Employees /wp-admin/admin.php?page=bookslots-employees2,2482.6141.8626.72
Services /wp-admin/admin.php?page=bookslots-services1,6152.3333.7626.58

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • bookslots

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 6× PHP files output text when accessed directly:
    • > /wp-content/plugins/bookslots-simple-booking-form/resources/views/partials/new-appointment.php
    • > /wp-content/plugins/bookslots-simple-booking-form/app/Includes/BaseCpt.php
    • > /wp-content/plugins/bookslots-simple-booking-form/resources/views/partials/new-service.php
    • > /wp-content/plugins/bookslots-simple-booking-form/vendor/symfony/translation/Resources/bin/translation-status.php
    • > /wp-content/plugins/bookslots-simple-booking-form/resources/views/partials/new-employee.php
    • > /wp-content/plugins/bookslots-simple-booking-form/app/Includes/BaseModel.php
  • 299× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      require_once(ABSPATHwp-admin/Includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/bookslots-simple-booking-form/app/Includes/ServiceTable.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'Rakit\\Validation\\Rule' not found in wp-content/plugins/bookslots-simple-booking-form/vendor/rakit/validation/src/Rules/NotIn.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\Loader\\LoaderInterface' not found in wp-content/plugins/bookslots-simple-booking-form/vendor/symfony/translation/Loader/QtFileLoader.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/bookslots-simple-booking-form/vendor/composer/installers/src/Composer/Installers/DframeInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\Formatter\\MessageFormatterInterface' not found in wp-content/plugins/bookslots-simple-booking-form/vendor/symfony/translation/Formatter/MessageFormatter.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Rakit\\Validation\\Rules\\Required' not found in wp-content/plugins/bookslots-simple-booking-form/vendor/rakit/validation/src/Rules/RequiredIf.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon\\Exceptions\\InvalidArgumentException' not found in wp-content/plugins/bookslots-simple-booking-form/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownGetterException.php:17
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/Includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/bookslots-simple-booking-form/app/Includes/ServiceTable.php on line 9
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\Loader\\LoaderInterface' not found in wp-content/plugins/bookslots-simple-booking-form/vendor/symfony/translation/Loader/IcuResFileLoader.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/bookslots-simple-booking-form/vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php:4

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 Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: instructors, appointment, reservation, salon, stripe...

bookslots-simple-booking-form/bookslots.php 85% from 13 tests

Analyzing the main PHP file in "BookSlots - Simple Booking Form" version 0.1.6
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("bookslots-simple-booking-form.php" instead of "bookslots.php")

Code Analysis 3% 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
These items require your attention
  • Do not distribute dangerous files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/bookslots-simple-booking-form/vendor/nesbot/carbon/bin/carbon.bat
49,509 lines of code in 1,067 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,0328,65428,07843,663
XSD392482,803
JSON11001,392
Markdown1049901,126
CSS34546385
YAML3313123
XML13410
DOS Batch1004
JavaScript2002
SVG1001

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
These items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 140)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity9.48
▷ Minimum class complexity1.00
▷ Maximum class complexity309.00
Average method complexity2.74
▷ Minimum method complexity1.00
▷ Maximum method complexity140.00
Code structure
Namespaces37
Interfaces30
Traits31
Classes311
▷ Abstract classes154.82%
▷ Concrete classes29695.18%
▷ Final classes134.39%
Methods2,088
▷ Static methods38918.63%
▷ Public methods1,76384.43%
▷ Protected methods1959.34%
▷ Private methods1306.23%
Functions346
▷ Named functions11132.08%
▷ Anonymous functions23567.92%
Constants122
▷ Global constants1512.30%
▷ Class constants10787.70%
▷ Public constants10497.20%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin