84% import-hotels-from-csv-for-bookingcom-affiliates

Code Review | Import hotels from CSV for Booking.com affiliates

WordPress plugin Import hotels from CSV for Booking.com affiliates scored84%from 54 tests.

About plugin

  • Plugin page: import-hotels-fro...
  • Plugin version: 0.8.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.4.2
  • WordPress version: 6.3.1
  • First release: May 25, 2016
  • Latest release: May 25, 2016
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: jcmoscardo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,967 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Import hotels from CSV for Booking.com affiliates
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.40 ▼4.32
Dashboard /wp-admin3.33 ▼0.0249.49 ▼11.63
Posts /wp-admin/edit.php3.44 ▲0.0952.27 ▲2.74
Add New Post /wp-admin/post-new.php5.91 ▲0.0298.11 ▼13.04
Media Library /wp-admin/upload.php3.25 ▲0.0238.83 ▲0.26
Import hotels for Booking.com affiliates /wp-admin/options-general.php?page=ihfc-settings-page3.2230.18

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Import hotels from CSV for Booking.com affiliates
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲13613.40 ▼1.168.89 ▲7.2046.61 ▲3.48
Dashboard /wp-admin2,199 ▲285.62 ▲0.0983.61 ▼5.9744.91 ▼1.06
Posts /wp-admin/edit.php2,104 ▲12.02 ▲0.0140.79 ▲4.6037.99 ▲1.37
Add New Post /wp-admin/post-new.php1,531 ▲523.26 ▲0.04609.06 ▼51.4946.47 ▼4.19
Media Library /wp-admin/upload.php1,401 ▼24.19 ▼0.0498.86 ▼4.1243.59 ▼4.06
Import hotels for Booking.com affiliates /wp-admin/options-general.php?page=ihfc-settings-page8112.0124.4429.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/import-hotels-from-csv-for-bookingcom-affiliates/import-hotels-from-csv-for-bookingcom-affiliates.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (First of all you need to downdoad from "Booking.com Affiliate Partner Center" the hotels datasets (TSV files).), #2 (Once you upload the hotels datasets to /tsv-uploads/. You need to Generate cache files.), #3 (Create a post draft as template, using (customization fields, adding translations, categories, etc etc).), #4 (Insert destinations ID and the draft post ID (template already created) and click for validation.), #5 (The destination id exists in the TSV files and the post ID is valid as hotel template. You can continue by clicking Import hotels), #6 (Impoer RESULTS. List of hotels (posts, status, languages) imported or updated. Only import or modified hotels 10 each time.), #7 (List of posts created (ex. portfolios categories Hotels and Mojacar), By default created as Draft, though It can be force to publish), #8 (Final post created. {{Name of field}} have been replaced by the hotel value.Ex. {{hotel_name}} => Real name of the hotel)
The official readme.txt might help

import-hotels-from-csv-for-bookingcom-affiliates/import-hotels-from-csv-for-bookingcom-affiliates.php 92% from 13 tests

The primary PHP file in "Import hotels from CSV for Booking.com affiliates" version 0.8.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected1,193 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP91651591,150
CSS17035
JavaScript1008

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity18.12
▷ Minimum class complexity2.00
▷ Maximum class complexity49.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods108
▷ Static methods54.63%
▷ Public methods8982.41%
▷ Protected methods00.00%
▷ Private methods1917.59%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants13100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin