90% avaibook

Code Review | AvaiBook vacation rental booking engine

WordPress plugin AvaiBook vacation rental booking engine scored90%from 54 tests.

About plugin

  • Plugin page: avaibook
  • Plugin version: 1.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.2
  • WordPress version: 6.3.1
  • First release: Jul 26, 2019
  • Latest release: May 4, 2023
  • Number of updates: 21
  • Update frequency: every 65.8 days
  • Top authors: avaibook (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /2,609 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.68ms] Passed 4 tests

This is a short check of server-side resources used by AvaiBook vacation rental booking engine
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0839.40 ▲3.37
Dashboard /wp-admin3.38 ▲0.0844.54 ▼2.08
Posts /wp-admin/edit.php3.49 ▲0.1446.53 ▼3.98
Add New Post /wp-admin/post-new.php5.96 ▲0.0786.85 ▼14.68
Media Library /wp-admin/upload.php3.30 ▲0.0733.78 ▲2.02

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 43 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
widget_avaibook_widget_3
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_avaibook_widget_2
db_upgraded
widget_theysaidso_widget
widget_avaibook_widget_1

Browser metrics Passed 4 tests

This is an overview of browser requirements for AvaiBook vacation rental booking engine
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.50 ▲0.101.87 ▲0.0542.96 ▼1.13
Dashboard /wp-admin2,218 ▲364.82 ▼0.07109.99 ▲5.8037.93 ▼8.62
Posts /wp-admin/edit.php2,101 ▲122.17 ▲0.1241.10 ▲3.2736.75 ▲0.99
Add New Post /wp-admin/post-new.php1,543 ▲1423.35 ▲5.02667.48 ▲23.1051.10 ▼3.17
Media Library /wp-admin/upload.php1,397 ▲154.15 ▼0.14103.08 ▲6.6244.58 ▲2.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_avaibook_widget_3
    • widget_avaibook_widget_2
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_avaibook_widget_1
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 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
9 plugin tags: vacation rental booking engine, avaibook, booking system, booking engine, online booking...

avaibook/avaibook.php Passed 13 tests

Analyzing the main PHP file in "AvaiBook vacation rental booking engine" version 1.2
44 characters long description:
Show Avaibook booking form in your wordpress

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
Good job! No executable or dangerous file extensions detected3,245 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript54251041,415
PO File84314391,041
PHP416585519
CSS2493270

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
12 PNG files occupy 7.49MB with 3.39MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png79.16KB28.59KB▼ 63.88%
assets/icon-128x128.png1.45KB1.30KB▼ 10.55%
assets/screenshot-1.png276.11KB86.21KB▼ 68.78%
assets/icon-256x256.png3.80KB3.50KB▼ 8.02%
assets/screenshot-8.png1,517.67KB374.88KB▼ 75.30%