84% wp-hotel-booking-wpml-support

Code Review | WP Hotel Booking WPML Support

WordPress plugin WP Hotel Booking WPML Support scored84%from 54 tests.

About plugin

  • Plugin page: wp-hotel-booking-...
  • Plugin version: 1.8.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.2
  • WordPress version: 6.3.1
  • First release: Nov 7, 2017
  • Latest release: Apr 26, 2023
  • Number of updates: 25
  • Update frequency: every 79.8 days
  • Top authors: leehld (72%)ThimPress (24%)phamtungpth (12%)

Code review

54 tests

User reviews

1 review

Install metrics

700+ active /11,793 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.05ms] Passed 4 tests

An overview of server-side resources used by WP Hotel Booking WPML Support
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0135.94 ▼7.29
Dashboard /wp-admin3.32 ▲0.0148.29 ▼6.19
Posts /wp-admin/edit.php3.37 ▲0.0150.72 ▲1.82
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.06 ▼13.05
Media Library /wp-admin/upload.php3.24 ▲0.0140.10 ▼1.67

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

WP Hotel Booking WPML Support: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6614.75 ▲0.351.94 ▲0.3042.11 ▼3.17
Dashboard /wp-admin2,208 ▲285.67 ▲0.1084.98 ▼7.9542.61 ▲0.57
Posts /wp-admin/edit.php2,114 ▲142.04 ▲0.0340.89 ▲3.5637.05 ▼3.43
Add New Post /wp-admin/post-new.php1,558 ▲1322.85 ▼0.34663.60 ▼29.0652.26 ▼16.71
Media Library /wp-admin/upload.php1,410 ▲104.28 ▲0.05103.10 ▼16.3444.73 ▼5.69

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-hotel-booking-wpml-support/wp-hotel-booking-wpml-support.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues 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
6 plugin tags: booking, hotel, hotel booking, reservations, wpml...

wp-hotel-booking-wpml-support/wp-hotel-booking-wpml-support.php Passed 13 tests

The entry point to "WP Hotel Booking WPML Support" version 1.8.3 is a PHP file that has certain tags in its header comment area
26 characters long description:
Multi language CMS support

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
No dangerous file extensions were detected578 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2132264559
JavaScript11219

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity40.50
▷ Minimum class complexity10.00
▷ Maximum class complexity71.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods37
▷ Static methods00.00%
▷ Public methods3697.30%
▷ Protected methods00.00%
▷ Private methods12.70%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin