78% bookingenius-booking-engine

Code Review | Bookingenius

WordPress plugin Bookingenius scored78%from 54 tests.

About plugin

  • Plugin page: bookingenius-book...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.7.5
  • WordPress version: 6.3.1
  • First release: Jul 8, 2017
  • Latest release: May 23, 2018
  • Number of updates: 48
  • Update frequency: every 6.7 days
  • Top authors: cgabbaninibegenius (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,203 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.17MB] [CPU: ▼1.45ms] Passed 4 tests

An overview of server-side resources used by Bookingenius
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1942.13 ▼1.31
Dashboard /wp-admin3.47 ▲0.1748.03 ▼2.84
Posts /wp-admin/edit.php3.58 ▲0.2348.16 ▲0.69
Add New Post /wp-admin/post-new.php6.05 ▲0.1795.99 ▼2.35
Media Library /wp-admin/upload.php3.39 ▲0.1737.96 ▲6.01

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 106 new files
Database: no new tables, 21 new options
New WordPress options
form_styles
bookingenius_form_labels
channel_3_label
bookingenius_form_orientation
multi_room_styles
widget_recent-posts
use_theme_calendar_skin
db_upgraded
bookingenius_icon_pos
theysaidso_admin_options
...

Browser metrics Passed 4 tests

Bookingenius: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲8213.22 ▼1.192.83 ▲0.5044.33 ▼0.71
Dashboard /wp-admin2,221 ▲305.80 ▼0.1099.72 ▼3.4639.46 ▼1.87
Posts /wp-admin/edit.php2,107 ▲182.01 ▲0.0140.02 ▲2.7135.05 ▼3.69
Add New Post /wp-admin/post-new.php1,543 ▲2923.18 ▲5.45664.00 ▼10.2861.95 ▲4.32
Media Library /wp-admin/upload.php1,409 ▲214.23 ▲0.0295.20 ▼16.5642.57 ▼0.21

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% 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 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
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/bookingenius-booking-engine/bookingenius-booking-engine.php
  • 13× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/bookingenius-booking-engine/config/plugin.php:164
    • > PHP Fatal error
      Uncaught Error: Call to a member function options() on null in wp-content/plugins/bookingenius-booking-engine/views/form.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Begenius\\Plugin' not found in wp-content/plugins/bookingenius-booking-engine/Bookingenius/class-bookingengine.php:12
    • > PHP Notice
      Undefined variable: plugin in wp-content/plugins/bookingenius-booking-engine/views/form.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'Begenius\\DynamicCss' not found in wp-content/plugins/bookingenius-booking-engine/Bookingenius/class-defaulttheme.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Begenius\\DynamicCss' not found in wp-content/plugins/bookingenius-booking-engine/Bookingenius/class-calendarskin.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Begenius\\PluginOption' not found in wp-content/plugins/bookingenius-booking-engine/vendor/Begenius/class-dropdownoption.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Begenius\\Serializer' not found in wp-content/plugins/bookingenius-booking-engine/vendor/Begenius/class-xmlserializer.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Begenius\\PluginOption' not found in wp-content/plugins/bookingenius-booking-engine/vendor/Begenius/class-checkboxoption.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/bookingenius-booking-engine/views/admin-page.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Donate link: Invalid url: "none"
  • Screenshots: Screenshot #1 (http://comments.reputationgenius.it/bg-reputationgenius/bg-reputationgenius-screenshot-1.jpg) image required
The official readme.txt is a good inspiration

bookingenius-booking-engine/bookingenius-booking-engine.php Passed 13 tests

"Bookingenius" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
51 characters long description:
Integration widget for BookinGenius Booking Engine.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin13,442 lines of code in 64 files:
LanguageFilesBlank linesComment linesLines of code
CSS152775,955
SVG1002,671
JavaScript163675352,340
PHP26298691,982
PO File6177177494

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity4.19
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes21
▷ Abstract classes419.05%
▷ Concrete classes1780.95%
▷ Final classes00.00%
Methods66
▷ Static methods1218.18%
▷ Public methods5786.36%
▷ Protected methods710.61%
▷ Private methods23.03%
Functions13
▷ Named functions1184.62%
▷ Anonymous functions215.38%
Constants12
▷ Global constants00.00%
▷ Class constants12100.00%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/flags/en.png4.33KB2.13KB▼ 50.70%
assets/img/flags/fr.png2.85KB2.03KB▼ 28.97%
assets/img/flags/pt.png3.77KB1.93KB▼ 48.82%
assets/img/flags/de.png3.22KB1.86KB▼ 42.23%
assets/img/flags/it.png3.19KB1.98KB▼ 37.78%