68% adiaha-hotel

Code Review | Flights & Hotels Booking WP Plugin

WordPress plugin Flights & Hotels Booking WP Plugin scored68%from 54 tests.

About plugin

  • Plugin page: adiaha-hotel
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 7, 2018
  • Latest release: Sep 24, 2023
  • Number of updates: 57
  • Update frequency: every 33.0 days
  • Top authors: adivaha (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

600+ active /8,830 total downloads

Benchmarks

Plugin footprint 65% 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.13MB] [CPU: ▼10.42ms] Passed 4 tests

A check of server-side resources used by Flights & Hotels Booking WP Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.42 ▲0.19
Dashboard /wp-admin3.44 ▲0.1448.03 ▼0.58
Posts /wp-admin/edit.php3.54 ▲0.1847.46 ▼7.58
Add New Post /wp-admin/post-new.php6.13 ▲0.2579.39 ▼33.70
Media Library /wp-admin/upload.php3.38 ▲0.1537.52 ▲3.02

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 32 new files
Database: 1 new table, 6 new options
New tables
wp_custom_plugin
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Flights & Hotels Booking WP Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.17 ▼0.181.96 ▲0.4046.18 ▲0.43
Dashboard /wp-admin2,219 ▲395.51 ▼0.1684.93 ▼4.2688.37 ▲47.10
Posts /wp-admin/edit.php2,127 ▲241.96 ▼0.0734.70 ▼2.0034.38 ▼4.84
Add New Post /wp-admin/post-new.php1,561 ▲3223.01 ▼0.01694.40 ▲20.8173.73 ▲20.18
Media Library /wp-admin/upload.php1,427 ▲274.22 ▲0.06100.66 ▼7.5572.55 ▲24.64

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_custom_plugin
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/adiaha-hotel/apps/index.php
  • 27× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant ADIVAHA__PLUGIN_URL - assumed 'ADIVAHA__PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/adiaha-hotel/apps/index.php on line 44
    • > PHP Notice
      Undefined variable: adivaha_nonce in wp-content/plugins/adiaha-hotel/apps/index.php on line 179
    • > PHP Warning
      Use of undefined constant ADIVAHA__PLUGIN_URL - assumed 'ADIVAHA__PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/adiaha-hotel/apps/index.php on line 588
    • > PHP Warning
      Use of undefined constant ADIVAHA__PLUGIN_URL - assumed 'ADIVAHA__PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/adiaha-hotel/apps/index.php on line 587
    • > PHP Notice
      Trying to get property 'form_autofill' of non-object in wp-content/plugins/adiaha-hotel/apps/index.php on line 394
    • > PHP Notice
      Trying to get property 'customer' of non-object in wp-content/plugins/adiaha-hotel/apps/index.php on line 466
    • > PHP Notice
      Undefined variable: chat_menu in wp-content/plugins/adiaha-hotel/apps/index.php on line 419
    • > PHP Warning
      Use of undefined constant ADIVAHA__PLUGIN_SITE_URL - assumed 'ADIVAHA__PLUGIN_SITE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/adiaha-hotel/apps/index.php on line 630
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/adiaha-hotel/apps/index.php on line 419
    • > PHP Notice
      Trying to get property 'customer' of non-object in wp-content/plugins/adiaha-hotel/apps/index.php on line 393

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4, #5, #6 in adiaha-hotel/assets to your readme.txt
Please take inspiration from this readme.txt

adiaha-hotel/adivaha.php 85% from 13 tests

This is the main PHP file of "Flights & Hotels Booking WP Plugin" version 2.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("adiaha-hotel.php" instead of "adivaha.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 254 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin1,560 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP4104861,313
CSS3781779
SVG60079
JavaScript784060
HTML10029

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions35
▷ Named functions35100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.11MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png0.57KB0.53KB▼ 7.17%
asset/images/icon.png3.07KB0.64KB▼ 79.17%
asset/images/ipad.png91.10KB27.20KB▼ 70.14%
images/quick-guide.png7.58KB3.75KB▼ 50.50%
images/logo.png1.91KB1.02KB▼ 46.49%