83% minical

Code Review | Minical Hotel Booking Plugin

WordPress plugin Minical Hotel Booking Plugin scored83%from 54 tests.

About plugin

  • Plugin page: minical
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Apr 11, 2022
  • Latest release: Oct 10, 2022
  • Number of updates: 17
  • Update frequency: every 11.1 days
  • Top authors: pankaj9296 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /490 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Analyzing server-side resources used by Minical Hotel Booking Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0448.86 ▲3.38
Dashboard /wp-admin3.34 ▲0.0446.23 ▼23.95
Posts /wp-admin/edit.php3.40 ▲0.0449.87 ▼4.98
Add New Post /wp-admin/post-new.php5.93 ▲0.0499.85 ▼3.26
Media Library /wp-admin/upload.php3.27 ▲0.0439.14 ▲3.44
Online Booking Engine /wp-admin/admin.php?page=online-booking-engine3.3537.49
Minical App /wp-admin/admin.php?page=minical-app3.2735.63
Minical /wp-admin/admin.php?page=minical-plugin3.3233.46

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 78 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
booking_engine_settings_0
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Minical Hotel Booking Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,924 ▲16313.52 ▼0.8512.71 ▲10.5044.99 ▼1.94
Dashboard /wp-admin2,223 ▲465.59 ▼0.0184.92 ▼10.6342.08 ▼1.20
Posts /wp-admin/edit.php2,131 ▲312.00 ▲0.0438.82 ▲0.7533.68 ▼0.48
Add New Post /wp-admin/post-new.php1,560 ▲3418.26 ▼4.87614.41 ▼6.9574.04 ▲24.58
Media Library /wp-admin/upload.php1,428 ▲284.29 ▲0.1199.18 ▼4.9045.91 ▼2.37
Online Booking Engine /wp-admin/admin.php?page=online-booking-engine8182.1129.7547.38
Minical App /wp-admin/admin.php?page=minical-app8802.1129.9027.71
Minical /wp-admin/admin.php?page=minical-plugin9362.2428.0729.27

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 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • booking_engine_settings_0
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/minical/admin/partials/minical-booking-engine-display.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/minical/admin/partials/minical-admin-display.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_key() in wp-content/plugins/minical/admin/partials/minical-home-page-display.php:15

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 108 tag instead of maximum 10
You can take inspiration from this readme.txt

minical/minical.php 92% from 13 tests

This is the main PHP file of "Minical Hotel Booking Plugin" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Domain Path: The domain path folder was not found ("/languages")

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
Success! There were no dangerous files found in this plugin6,921 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
CSS676681,566
JavaScript7228591,520
PHP132505711,160
HTML1104

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity10.43
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity2.89
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods35
▷ Static methods25.71%
▷ Public methods3085.71%
▷ Protected methods00.00%
▷ Private methods514.29%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants16100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
31 PNG files occupy 1.68MB with 0.96MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/9.png89.13KB42.18KB▼ 52.68%
admin/images/select-box.png3.57KB1.36KB▼ 61.83%
admin/images/vertical_ln.png2.73KB0.09KB▼ 96.85%
assets/final_preview.png23.43KB22.39KB▼ 4.43%
admin/images/gp.png3.27KB0.99KB▼ 69.68%