94% adiaha-hotel

Code Review | Adivaha

WordPress plugin Adivaha scored 94% from 54 tests.

About plugin

  • Plugin page: adiaha-hotel
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.0-4.9.7
  • WordPress version: 5.9.2
  • First release: Aug 7, 2018
  • Latest release: Aug 7, 2018
  • Number of updates: 3
  • Update frequency: every 1.7 days
  • Top authors: adivaha (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active / 3,805 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼299.87ms] Passed 4 tests

Analyzing server-side resources used by Adivaha
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.0664.29 ▲12.09
Dashboard /wp-admin3.48 ▲0.0742.52 ▼19.52
Posts /wp-admin/edit.php3.70 ▲0.0649.85 ▼28.12
Add New Post /wp-admin/post-new.php6.95 ▼0.03112.15 ▼1,155.94
Media Library /wp-admin/upload.php3.36 ▲0.0631.63 ▲4.11

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Adivaha
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,812 ▲7016.12 ▲0.426.08 ▲0.152.11 ▼0.20
Dashboard /wp-admin2,918 ▲576.17 ▼0.01126.56 ▼8.91175.03 ▲10.31
Posts /wp-admin/edit.php2,715 ▲243.13 ▼0.1163.46 ▼2.39139.48 ▼13.08
Add New Post /wp-admin/post-new.php1,723 ▲3317.32 ▼3.42413.05 ▼51.80244.31 ▲80.48
Media Library /wp-admin/upload.php1,723 ▲255.82 ▲0.33126.16 ▼12.98211.46 ▲25.02

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

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)
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/adiaha-hotel/includes/shortCode.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_menu_page() in wp-content/plugins/adiaha-hotel/includes/left-admin-menu.php:2

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 issues were found


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: hotel, hotel api, free hotel api

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

The primary PHP file in "Adivaha" version 1.0.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("adiaha-hotel.php" instead of "adivaha.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin390 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code

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.08
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions18100.00%
▷ Anonymous functions00.00%
▷ Global constants00.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
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo.png1.91KB1.02KB▼ 46.49%
images/quick-guide.png7.58KB3.75KB▼ 50.50%
images/icon.png0.57KB0.53KB▼ 7.17%