78% procommerca-booking

Code Review | Funbutler Booking

WordPress plugin Funbutler Booking scored 78% from 54 tests.

About plugin

  • Plugin page: procommerca-booking
  • Plugin version: 0.14
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.4
  • WordPress version: 5.9.2
  • First release: Feb 26, 2020
  • Latest release: Oct 22, 2021
  • Number of updates: 12
  • Update frequency: every 50.3 days
  • Top authors: procommerca (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 801 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.02MB] [CPU: ▼295.92ms] Passed 4 tests

A check of server-side resources used by Funbutler Booking
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0554.11 ▼3.16
Dashboard /wp-admin3.46 ▲0.0541.20 ▲8.67
Posts /wp-admin/edit.php3.69 ▲0.0540.64 ▲2.54
Add New Post /wp-admin/post-new.php6.93 ▼0.0494.58 ▼1,184.35
Media Library /wp-admin/upload.php3.35 ▲0.0525.77 ▲1.30
Funbutler /wp-admin/options-general.php?page=procommerca-options-page3.2922.29

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 1 new option
New WordPress options
procommerca-settings

Browser metrics Passed 4 tests

Funbutler Booking: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,825 ▲10324.89 ▲8.85288.12 ▲282.462.91 ▲0.51
Dashboard /wp-admin2,893 ▲396.14 ▼0.07116.97 ▼20.23153.79 ▼9.51
Posts /wp-admin/edit.php2,693 ▼13.24 ▲0.0162.00 ▼4.70139.59 ▼6.32
Add New Post /wp-admin/post-new.php1,714 ▲5320.74 ▲3.90452.07 ▲40.54161.76 ▲8.42
Media Library /wp-admin/upload.php1,703 ▲55.53 ▼0.00153.53 ▲2.08185.16 ▼4.60
Funbutler /wp-admin/options-general.php?page=procommerca-options-page1,0222.4152.73107.72

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 option in the database
    • procommerca-settings

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=procommerca-options-page
    • > Notice in wp-content/plugins/procommerca-booking/settings-page.php+61
    Undefined index: test-mode
    • > GET request to /wp-admin/options-general.php?page=procommerca-options-page
    • > Notice in wp-content/plugins/procommerca-booking/settings-page.php+62
    Undefined index: api-key
    • > GET request to /wp-admin/options-general.php?page=procommerca-options-page
    • > Notice in wp-content/plugins/procommerca-booking/settings-page.php+100
    Undefined index: disconnect
    • > GET request to /wp-admin/options-general.php?page=procommerca-options-page
    • > Notice in wp-content/plugins/procommerca-booking/settings-page.php+101
    Undefined index: client-id
    • > GET request to /wp-admin/options-general.php?page=procommerca-options-page
    • > Notice in wp-content/plugins/procommerca-booking/settings-page.php+241
    Undefined variable: notice

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
The following issues need your attention
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/procommerca-booking/shortcodes.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/procommerca-booking/inc/settings.inc.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/procommerca-booking/settings-page-legacy.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/procommerca-booking/menu-item.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function procommerca_get_settings() in wp-content/plugins/procommerca-booking/settings-page.php:7

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 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: escape room, booking, playland, funbutler, lasertag...

procommerca-booking/plugin.php 92% from 13 tests

This is the main PHP file of "Funbutler Booking" version 0.14, 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: The principal plugin file should be the same as the plugin slug ("procommerca-booking.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin587 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP710729517
Sass13042
CSS13028

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png6.61KB3.24KB▼ 50.94%
assets/icon-256x256.png21.82KB5.22KB▼ 76.08%