99% avirato-hotels-categories

Code Review | Avirato Hotels Categories

WordPress plugin Avirato Hotels Categories scored 99% from 54 tests.

About plugin

  • Plugin page: avirato-hotels-ca...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7.1
  • WordPress version: 5.8.1
  • First release: Jul 31, 2019
  • Latest release: Apr 20, 2021
  • Number of updates: 22
  • Update frequency: every 28.6 days
  • Top authors: avirato (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 775 total downloads

Benchmarks

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
This plugin's installer ran successfully

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

Analyzing server-side resources used by Avirato Hotels Categories
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.1936.19 ▲14.83
Dashboard /wp-admin3.14 ▲0.0846.60 ▼0.09
Posts /wp-admin/edit.php3.19 ▲0.0845.86 ▲7.96
Add New Post /wp-admin/post-new.php5.49 ▲0.0694.86 ▼564.82
Media Library /wp-admin/upload.php3.08 ▲0.0834.48 ▲0.28
Avirato Categories /wp-admin/admin.php?page=ahc_aviratoCategories-content-settings3.0529.60
Avirato Suite /wp-admin/admin.php?page=ahs_aviratoSuite-content-settings3.0527.46

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 21 new files
Database: 3 new tables, no new options
New tables
wp_ahc_cron_try
wp_ahc_textComp_Cat
wp_ahc_textComp_Cats

Browser metrics Passed 4 tests

A check of browser resources used by Avirato Hotels Categories
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,862 ▲26616.73 ▲1.0617.51 ▲5.5152.76 ▲3.67
Dashboard /wp-admin2,996 ▲625.88 ▼0.12143.31 ▼5.99133.53 ▲20.56
Posts /wp-admin/edit.php2,794 ▲552.70 ▼0.0270.06 ▲1.5789.00 ▼2.39
Add New Post /wp-admin/post-new.php1,708 ▲12718.42 ▲2.03415.41 ▼99.37106.40 ▼35.96
Media Library /wp-admin/upload.php1,856 ▲495.01 ▼0.03139.86 ▼29.89150.48 ▲36.03
Avirato Categories /wp-admin/admin.php?page=ahc_aviratoCategories-content-settings1,2772.3454.5189.28
Avirato Suite /wp-admin/admin.php?page=ahs_aviratoSuite-content-settings1,2292.0954.4087.91

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Donate link: Invalid URI ("")
You can take inspiration from this readme.txt

avirato-hotels-categories/Avirato_Hotels_Categories.php 92% from 13 tests

The entry point to "Avirato Hotels Categories" version 1.1.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("avirato-hotels-categories.php" instead of "Avirato_Hotels_Categories.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,689 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS656821,005
PHP14037484
JavaScript32215200

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Functions18
▷ Named functions18100.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
9 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/icons/icon-128x128.png3.73KB2.41KB▼ 35.32%
includes/icons/icono-WEBINARS-PROXIMOS.png1.63KB1.66KB0.00%
includes/icons/Icono-manual-de-usuario.png0.92KB0.50KB▼ 45.59%
includes/icons/ic_event_black_24dp_2x.png0.18KB0.26KB0.00%
includes/icons/avirato-logo.png4.40KB2.39KB▼ 45.71%