72% just-keeping-hotel-booking-records

Code Review | Just Keeping Hotel Booking Records

WordPress plugin Just Keeping Hotel Booking Records scored72%from 54 tests.

About plugin

  • Plugin page: just-keeping-hote...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 18, 2023
  • Latest release: Jan 18, 2023
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: manishswamy077 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /638 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼5.82ms] Passed 4 tests

This is a short check of server-side resources used by Just Keeping Hotel Booking Records
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1838.89 ▼17.38
Dashboard /wp-admin3.48 ▲0.1848.23 ▼3.59
Posts /wp-admin/edit.php3.59 ▲0.2444.49 ▼2.46
Add New Post /wp-admin/post-new.php6.17 ▲0.2981.23 ▲0.16
Media Library /wp-admin/upload.php3.40 ▲0.1735.16 ▲2.55
Accommodation /wp-admin/edit-tags.php?taxonomy=accommodation&post_type=just-my-hotel3.3936.05
All Bookings /wp-admin/edit.php?post_type=just-my-booking3.3531.49
All Hotels /wp-admin/edit.php?post_type=just-my-hotel3.4432.06

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Just Keeping Hotel Booking Records
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲8814.47 ▼0.281.79 ▼1.0444.80 ▼5.45
Dashboard /wp-admin2,237 ▲464.84 ▼1.04111.64 ▲4.4341.43 ▲0.97
Posts /wp-admin/edit.php2,120 ▲281.97 ▼0.0737.72 ▼0.3630.72 ▲0.91
Add New Post /wp-admin/post-new.php1,559 ▲4023.33 ▲0.02666.05 ▲71.2754.79 ▲6.31
Media Library /wp-admin/upload.php1,419 ▲284.17 ▼0.0798.04 ▼4.2042.25 ▼3.87
Accommodation /wp-admin/edit-tags.php?taxonomy=accommodation&post_type=just-my-hotel1,2672.1426.2627.34
All Bookings /wp-admin/edit.php?post_type=just-my-booking1,1762.2234.7432.71
All Hotels /wp-admin/edit.php?post_type=just-my-hotel1,0842.0029.8328.93

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/edit.php?post_type=just-my-booking
    • > Warning in wp-content/plugins/just-keeping-hotel-booking-records/admin/class-my-booking.php+421
    filemtime(): stat failed for wp-content/plugins/just-keeping-hotel-booking-records/admin/assets/js/custom_filter_handler.js

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
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function justkeepingrecords\\add_action() in wp-content/plugins/just-keeping-hotel-booking-records/admin/class-my-booking.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function test_name_space\\add_action() in wp-content/plugins/just-keeping-hotel-booking-records/admin/templates/class-hotelfilter.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/just-keeping-hotel-booking-records/admin/templates/location_HTML.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function justkeepingrecords\\add_action() in wp-content/plugins/just-keeping-hotel-booking-records/admin/class-hotelhandler.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function justkeepingrecords\\add_action() in wp-content/plugins/just-keeping-hotel-booking-records/admin/class-my-booking.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/just-keeping-hotel-booking-records/admin/templates/hotel_HTML.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/edit.php?post_type=just-my-booking
    • > Network (severe)
    wp-content/plugins/just-keeping-hotel-booking-records/admin/assets/js/custom_filter_handler.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (screenshot-1.png adding hotel), #2 (screenshot-2.png adding booking details manually)
You can look at the official readme.txt

just-keeping-hotel-booking-records/just-keeping-records.php 85% from 13 tests

The primary PHP file in "Just Keeping Hotel Booking Records" version 1.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("just-keeping-hotel-booking-records.php" instead of "just-keeping-records.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

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
No dangerous file extensions were detected744 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP10160225662
JavaScript34381
CSS1001

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.31
Average class complexity24.67
▷ Minimum class complexity7.00
▷ Maximum class complexity44.00
Average method complexity3.37
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods30
▷ Static methods310.00%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
2 PNG files occupy 0.17MB with 0.13MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png82.83KB21.61KB▼ 73.91%
screenshot-1.png92.89KB23.52KB▼ 74.67%