10% resonline-booking-gadget

Code Review | ResOnline Booking Gadget

WordPress plugin ResOnline Booking Gadget scored 10% from 54 tests.

About plugin

  • Plugin page: resonline-booking...
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2.1
  • WordPress version: 6.3.1
  • First release: Jul 16, 2019
  • Latest release: Jul 18, 2019
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: psdtofinal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 544 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/resonline-booking-gadget/lib/PhxResOnlineAdmin.php+206
    Undefined variable: code_canyon_slug

Server metrics [RAM: ▲0.01MB] [CPU: ▲0.59ms] Passed 4 tests

An overview of server-side resources used by ResOnline Booking Gadget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.00 ▼3.10
Dashboard /wp-admin3.32 ▲0.0145.10 ▼2.41
Posts /wp-admin/edit.php3.37 ▲0.0150.32 ▲8.14
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.30 ▲0.31
Media Library /wp-admin/upload.php3.24 ▲0.0141.82 ▲7.57
ResOnline /wp-admin/options-general.php?page=phx-resonline-booking-gadget-options3.2731.19

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 11 new options
New WordPress options
phx-resonline-booking-gadget-columns
widget_recent-comments
widget_theysaidso_widget
phx-resonline-booking-gadget-currency
widget_recent-posts
phx-resonline-booking-gadget-layout
theysaidso_admin_options
db_upgraded
phx-resonline-booking-gadget-label
can_compress_scripts
...

Browser metrics Passed 4 tests

Checking browser requirements for ResOnline Booking Gadget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6813.46 ▼0.971.55 ▼0.6738.72 ▼11.76
Dashboard /wp-admin2,231 ▲435.13 ▼0.77105.43 ▼1.8037.71 ▼4.47
Posts /wp-admin/edit.php2,116 ▲272.32 ▲0.3242.06 ▲4.8833.65 ▲1.15
Add New Post /wp-admin/post-new.php1,691 ▲15822.79 ▼0.69579.25 ▼105.0130.11 ▼24.48
Media Library /wp-admin/upload.php1,416 ▲284.42 ▲0.1798.34 ▼7.7743.91 ▼2.09
ResOnline /wp-admin/options-general.php?page=phx-resonline-booking-gadget-options1,2152.0928.4450.61

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 11 options
    • phx-resonline-booking-gadget-currency
    • widget_recent-comments
    • phx-resonline-booking-gadget-show-images
    • phx-resonline-booking-gadget-layout
    • theysaidso_admin_options
    • db_upgraded
    • phx-resonline-booking-gadget-columns
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • ...

Smoke tests 75% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/resonline-booking-gadget/templates/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/resonline-booking-gadget/phx-resonline-booking-gadget.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Screenshot #5 (Shortcode options (available from *WordPress Dashboard* => *Settings* => *ResOnline* once the plugin has been installed and activated)) image missing
You can take inspiration from this readme.txt

resonline-booking-gadget/phx-resonline-booking-gadget.php 77% from 13 tests

"ResOnline Booking Gadget" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("resonline-booking-gadget.php" instead of "phx-resonline-booking-gadget.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 215 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin551 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP6126338549
CSS1001
JavaScript1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity14.00
▷ Minimum class complexity11.00
▷ Maximum class complexity20.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1280.00%
▷ Protected methods00.00%
▷ Private methods320.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
PNG images were not found in this plugin