83% appointment-reservation-and-rental-booking-for-woocommerce

Code Review | Appointment, Reservation and Rental Booking for Woocommerce

WordPress plugin Appointment, Reservation and Rental Booking for Woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: appointment-reser...
  • Plugin version: 3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.0-5.6
  • WordPress version: 6.3.1
  • First release: Oct 13, 2016
  • Latest release: Dec 28, 2020
  • Number of updates: 101
  • Update frequency: every 15.2 days
  • Top authors: phoeniixx (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active /17,247 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.10ms] Passed 4 tests

A check of server-side resources used by Appointment, Reservation and Rental Booking for Woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0136.16 ▼10.09
Dashboard /wp-admin3.31 ▲0.0044.47 ▼1.16
Posts /wp-admin/edit.php3.36 ▲0.0048.17 ▼1.72
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.94 ▼23.41
Media Library /wp-admin/upload.php3.23 ▲0.0035.82 ▲0.22

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Appointment, Reservation and Rental Booking for Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.25 ▼1.101.71 ▼0.1142.79 ▲0.09
Dashboard /wp-admin2,212 ▲214.87 ▼0.98102.14 ▲3.8143.03 ▼1.34
Posts /wp-admin/edit.php2,097 ▲52.06 ▲0.0739.18 ▼3.1236.39 ▲0.52
Add New Post /wp-admin/post-new.php1,539 ▲523.33 ▲0.19671.66 ▲25.7653.31 ▼11.14
Media Library /wp-admin/upload.php1,394 ▲34.19 ▼0.0896.45 ▼3.1142.68 ▲0.22

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
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Please fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/appointment-reservation-and-rental-booking-for-woocommerce/libs/tgm/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/appointment-reservation-and-rental-booking-for-woocommerce/libs/tgm/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/appointment-reservation-and-rental-booking-for-woocommerce/libs/tgm/class-tgm-plugin-activation.php:2109

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention: You can take inspiration from this readme.txt

appointment-reservation-and-rental-booking-for-woocommerce/phoen_date.php 77% from 13 tests

The primary PHP file in "Appointment, Reservation and Rental Booking for Woocommerce" version 3.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("appointment-reservation-and-rental-booking-for-woocommerce.php" instead of "phoen_date.php")
  • Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "3.2.0")

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
Good job! No executable or dangerous file extensions detected25,665 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript95,0193,13419,969
PHP71,3691,6863,626
CSS121991862,070

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity41.89
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity4.41
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods108
▷ Static methods54.63%
▷ Public methods8578.70%
▷ Protected methods2321.30%
▷ Private methods00.00%
Functions33
▷ Named functions3296.97%
▷ Anonymous functions13.03%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/arrow-2.png0.42KB0.27KB▼ 35.68%
assets/images/clock.png0.74KB0.61KB▼ 17.77%
assets/images/arrow-1.png1.17KB0.27KB▼ 77.39%
assets/images/aa2.png1.34KB1.26KB▼ 5.77%
assets/images/calender.png0.76KB0.64KB▼ 15.21%