10% jomres

Code Review | Jomres Hotel Booking Engine for WordPress

WordPress plugin Jomres Hotel Booking Engine for WordPress scored10%from 54 tests.

About plugin

  • Plugin page: jomres
  • Plugin version: 10.7.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-6.0.2
  • WordPress version: 6.3.1
  • First release: Apr 28, 2014
  • Latest release: Jul 13, 2023
  • Number of updates: 231
  • Update frequency: every 14.6 days
  • Top authors: jomres (100%)

Code review

54 tests

User reviews

25 reviews

Install metrics

100+ active /39,125 total downloads

Benchmarks

Plugin footprint 39% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/jomres/jomres/libraries/jomres/cms_specific/wordpress/init_config_vars.php+40
    include(wp-content/plugins/jomres//jomres/configuration.php): failed to open stream: No such file or directory

Server metrics [RAM: ▲0.11MB] [CPU: ▼0.02ms] Passed 4 tests

An overview of server-side resources used by Jomres Hotel Booking Engine for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1143.08 ▼2.43
Dashboard /wp-admin3.41 ▲0.1153.40 ▲0.70
Posts /wp-admin/edit.php3.53 ▲0.1751.56 ▲5.50
Add New Post /wp-admin/post-new.php6.00 ▲0.1192.24 ▲1.84
Media Library /wp-admin/upload.php3.34 ▲0.1137.23 ▼0.20

Server storage [IO: ▲33.98MB] [DB: ▲0.21MB] 33% from 3 tests

A short overview of filesystem and database impact
These are issues you should consider
  • You have illegally modified 3437 files (34,733.52KB) outside of "wp-content/plugins/jomres/" and "wp-content/uploads/"
    • (new file) jomres/api/classes/all_api_features.class.php
    • (new file) jomres/CHANGELOG_JOMRES
    • (new file) jomres/.gitignore
    • (new file) jomres/.gitattributes
    • (new file) jomres/README.md
    • (new file) jomres/INSTALL_JOMRES
    • (new file) jomres/api/classes/call.class.php
    • (new file) jomres/admin.php
    • (new file) jomres/api/.htaccess
    • (new file) jomres/LICENSE
    • ...
  • Filesystem usage must be lower than 25MB (currently using 33.98MB)
Filesystem: 3,452 new files
Database: 71 new tables, 7 new options
New tables
wp_jomres_rates
wp_jomres_gdpr_optins
wp_jomres_webhooks_integrations
wp_jomresportal_c_rates
wp_jomcomp_tarifftypes
wp_jomres_customertypes
wp_jomres_reviews_ratings_detail
wp_jomcomp_tarifftype_rate_xref
wp_jomres_images
wp_jomres_room_classes
...
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
jomres_wp_plugin_version
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Jomres Hotel Booking Engine for WordPress: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲4113.28 ▼1.021.76 ▼0.3641.89 ▼2.10
Dashboard /wp-admin2,221 ▲335.86 ▲0.95100.62 ▼13.6642.41 ▼1.12
Posts /wp-admin/edit.php2,101 ▲122.00 ▲0.0133.82 ▼5.3934.85 ▼0.34
Add New Post /wp-admin/post-new.php1,543 ▲2423.44 ▲0.29638.12 ▲17.0457.14 ▲2.18
Media Library /wp-admin/upload.php1,397 ▲154.22 ▼0.05106.37 ▲3.0047.48 ▲4.61

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure failed, leaving 71 tables in the database
    • wp_jomresportal_invoices_transactions
    • wp_jomres_partners
    • wp_jomres_tax_rules
    • wp_jomres_regions
    • wp_jomres_guest_profile
    • wp_jomres_invoice_pii_sellers
    • wp_jomresportal_lineitems
    • wp_jomres_hotel_features_categories
    • wp_jomresportal_subscriptions
    • wp_jomres_hotel_features
    • ...
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 99× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/jomres/jomres/libraries/packages/vendor/stripe/stripe-php/update_certs.php
    • > /wp-content/plugins/jomres/jomres/libraries/jomres/cms_specific/joomla4/cms_specific_installation.php
    • > /wp-content/plugins/jomres/jomres/core-minicomponents/j16000property_approvals.class.php
    • > /wp-content/plugins/jomres/jomres/core-minicomponents/j04950translation_definitions_room_features.class.php
    • > /wp-content/plugins/jomres/jomres/libraries/jomres/cms_specific/wordpress/cms_specific_endrun.php
    • > /wp-content/plugins/jomres/jomres/assets/templates/bootstrap5/frontend/main.php
    • > /wp-content/plugins/jomres/jomres/core-minicomponents/j06002delete_tariff_advanced.class.php
    • > /wp-content/plugins/jomres/jomres/core-minicomponents/j00501xtariffsenhanced.class.php
    • > /wp-content/plugins/jomres/jomres/libraries/jomres/cms_specific/joomla4/cms_specific_functions.php
    • > /wp-content/plugins/jomres/jomres/language/fr-FR.php
  • 1835× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/jomres/jomres/libraries/packages/vendor/aws/aws-sdk-php/src/Organizations/OrganizationsClient.php:111
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\OptionsResolver\\Exception\\ExceptionInterface' not found in wp-content/plugins/jomres/jomres/libraries/packages/vendor/symfony/options-resolver/Exception/AccessException.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/jomres/jomres/libraries/packages/vendor/aws/aws-sdk-php/src/Swf/SwfClient.php:84
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/jomres/jomres/libraries/packages/vendor/aws/aws-sdk-php/src/ServerlessApplicationRepository/Exception/ServerlessApplicationRepositoryException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/jomres/jomres/libraries/packages/vendor/aws/aws-sdk-php/src/ManagedBlockchain/ManagedBlockchainClient.php:49
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_AttrDef_HTML_Pixels' not found in wp-content/plugins/jomres/jomres/libraries/packages/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Length.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/jomres/jomres/libraries/packages/vendor/aws/aws-sdk-php/src/S3/Transfer.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/jomres/jomres/libraries/packages/vendor/aws/aws-sdk-php/src/ConnectParticipant/Exception/ConnectParticipantException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_URIFilter' not found in wp-content/plugins/jomres/jomres/libraries/packages/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIFilter/HostBlacklist.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_AttrDef_URI' not found in wp-content/plugins/jomres/jomres/libraries/packages/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/URI.php:12

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 96% from 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
8 plugin tags: hotel, reservations, jomres, hotel booking, booking engine...

jomres/jomres.php 92% from 13 tests

The entry point to "Jomres Hotel Booking Engine for WordPress" version 10.7.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis 0% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
It is important to fix the following items
  • Do not distribute dangerous files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/jomres/jomres/libraries/packages/vendor/stripe/stripe-php/data/ca-certificates.crt
      • wp-content/plugins/jomres/jomres/libraries/vendor/stripe/stripe-php/data/ca-certificates.crt
    • .bat - Batch File in Windows
      • wp-content/plugins/jomres/jomres/libraries/packages/vendor/nesbot/carbon/bin/carbon.bat
      • wp-content/plugins/jomres/jomres/libraries/packages/vendor/bin/jp.php.bat
    • .cmd - Command Script in Windows
      • wp-content/plugins/jomres/jomres/libraries/packages/node_modules/.bin/commonmark.cmd
      • wp-content/plugins/jomres/jomres/libraries/packages/node_modules/.bin/tmpl.js.cmd
1,556,157 lines of code in 9,384 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1,847158,714160,892813,432
PHP4,91875,260171,267426,565
CSS33211,8024,324142,609
HTML1,0916,1743,90663,885
SVG5190239,132
Markdown1698,869021,718
LESS1762,9133,52717,751
JSON14842017,559
Sass1101,3871,1767,717
XSD392482,803
TypeScript63081,1081,789
XML24506525
YAML17289306
make5384102
reStructuredText2562989
diff1134346
Bourne Shell66144
CoffeeScript18036
DOS Batch40022
INI4247017
Dockerfile18010

PHP code 0% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 7,031)
  • Method cyclomatic complexity should be reduced to less than 100 (currently 460)
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity15.63
▷ Minimum class complexity1.00
▷ Maximum class complexity7,031.00
Average method complexity4.70
▷ Minimum method complexity1.00
▷ Maximum method complexity460.00
Code structure
Namespaces631
Interfaces137
Traits69
Classes2,880
▷ Abstract classes692.40%
▷ Concrete classes2,81197.60%
▷ Final classes401.42%
Methods12,916
▷ Static methods1,42010.99%
▷ Public methods10,78483.49%
▷ Protected methods8496.57%
▷ Private methods1,2839.93%
Functions1,433
▷ Named functions75052.34%
▷ Anonymous functions68347.66%
Constants3,001
▷ Global constants33711.23%
▷ Class constants2,66488.77%
▷ Public constants2,664100.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
1328 compressed PNG files occupy 2.93MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
jomres/uploadedimages/pfeatures/medium/entrance_fees.png0.25KB0.26KB0.00%
jomres/uploadedimages/pfeatures/medium/fees_pound.png0.39KB0.40KB0.00%
jomres/assets/images/icons/pfeatures/canoeing.png0.56KB0.56KB0.00%
jomres/uploadedimages/pfeatures/medium/groups.png0.25KB0.26KB0.00%
jomres/uploadedimages/pfeatures/medium/shower_only.png0.53KB0.54KB0.00%