78% regiondo-booking-widget

Code Review | Regiondo Booking Widget

WordPress plugin Regiondo Booking Widget scored78%from 54 tests.

About plugin

  • Plugin page: regiondo-booking-...
  • Plugin version: 2.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 11, 2017
  • Latest release: Oct 4, 2023
  • Number of updates: 19
  • Update frequency: every 118.2 days
  • Top authors: regiondo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /1,943 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.81ms] Passed 4 tests

A check of server-side resources used by Regiondo Booking Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0841.29 ▲1.41
Dashboard /wp-admin3.38 ▲0.0448.63 ▼10.04
Posts /wp-admin/edit.php3.50 ▲0.1444.88 ▼2.26
Add New Post /wp-admin/post-new.php5.96 ▲0.0880.51 ▼8.34
Media Library /wp-admin/upload.php3.31 ▲0.0836.47 ▲1.71
Regiondo widgets /wp-admin/edit.php?post_type=regiondo_iframe3.3535.85
Add new widget /wp-admin/post-new.php?post_type=regiondo_iframe3.3544.15

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Regiondo Booking Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,869 ▲12313.18 ▼1.201.80 ▲0.0144.23 ▲3.18
Dashboard /wp-admin2,272 ▲804.86 ▼0.08112.36 ▲7.2243.22 ▲0.52
Posts /wp-admin/edit.php2,155 ▲661.98 ▼0.0633.77 ▼3.5535.22 ▲1.64
Add New Post /wp-admin/post-new.php1,608 ▲8918.45 ▼4.85603.49 ▼88.5367.72 ▼6.00
Media Library /wp-admin/upload.php1,457 ▲694.22 ▼0.0496.30 ▼11.9040.55 ▼10.06
Regiondo widgets /wp-admin/edit.php?post_type=regiondo_iframe1,0852.0030.0028.69
Add new widget /wp-admin/post-new.php?post_type=regiondo_iframe1,5452.6957.3658.21

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_regiondo_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

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
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/regiondo-booking-widget/regiondo-widget.php
    • > /wp-content/plugins/regiondo-booking-widget/regiondo-widget-init.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/regiondo-booking-widget/meta-box.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: booking system, regiondo, react, iframe, booking widget...

regiondo-booking-widget/regiondo-widget-init.php 92% from 13 tests

The main PHP file in "Regiondo Booking Widget" ver. 2.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("regiondo-booking-widget.php" instead of "regiondo-widget-init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected264 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33621264

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.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
1 PNG file occupies 0.44MB with 0.30MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png451.38KB146.46KB▼ 67.55%