84% 1day-io

Code Review | 1Day Booking Engine

WordPress plugin 1Day Booking Engine scored84%from 54 tests.

About plugin

  • Plugin page: 1day-io
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Jul 6, 2021
  • Latest release: Nov 28, 2022
  • Number of updates: 39
  • Update frequency: every 13.3 days
  • Top authors: opanasenkomaksim (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /781 total downloads

Benchmarks

Plugin footprint 83% from 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.18MB] [CPU: ▼0.37ms] Passed 4 tests

An overview of server-side resources used by 1Day Booking Engine
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1838.51 ▼1.36
Dashboard /wp-admin3.48 ▲0.1850.03 ▲2.37
Posts /wp-admin/edit.php3.60 ▲0.2452.73 ▲1.51
Add New Post /wp-admin/post-new.php6.09 ▲0.2095.34 ▼0.96
Media Library /wp-admin/upload.php3.41 ▲0.1838.43 ▼0.66

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 52 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for 1Day Booking Engine
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,923 ▲16214.18 ▼0.5410.02 ▲8.3037.71 ▼5.50
Dashboard /wp-admin2,243 ▲665.91 ▲0.2590.83 ▲0.7943.37 ▲1.53
Posts /wp-admin/edit.php2,152 ▲492.38 ▲0.3740.70 ▼2.2837.94 ▼2.55
Add New Post /wp-admin/post-new.php1,569 ▲4323.25 ▲0.50599.40 ▼76.6534.14 ▼25.78
Media Library /wp-admin/upload.php1,451 ▲544.55 ▲0.31100.31 ▼1.6646.12 ▲5.23

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 30× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: room in wp-content/plugins/1day-io/inc/templates/rooms/rates/rates-list.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/1day-io/inc/enqueue_scripts.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/1day-io/inc/templates/admin/review.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/1day-io/inc/hooks/woocommerce.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/1day-io/inc/shortcodes/search_form.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/1day-io/inc/templates/rooms/data.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/1day-io/inc/shortcodes/search_results.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/1day-io/inc/class/init/init_filter_post_type.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/1day-io/inc/templates/rooms/booking_button.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/1day-io/inc/templates/search/form.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: booking engine, reservation, hotel, hotel booking, booking system...

1day-io/1day-io.php Passed 13 tests

Analyzing the main PHP file in "1Day Booking Engine" version 1.0.4
48 characters long description:
The plugin display hotels and rooms from 1day.io

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin3,316 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
PHP397241693,311
CSS2022
JavaScript2002
JSON1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity33.12
▷ Minimum class complexity1.00
▷ Maximum class complexity135.00
Average method complexity3.77
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods74
▷ Static methods45.41%
▷ Public methods6689.19%
▷ Protected methods00.00%
▷ Private methods810.81%
Functions72
▷ Named functions5677.78%
▷ Anonymous functions1622.22%
Constants8
▷ Global constants8100.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 files were detected