74% softmogul-booking-engine

Code Review | Softmogul Booking Engine

WordPress plugin Softmogul Booking Engine scored74%from 54 tests.

About plugin

  • Plugin page: softmogul-booking...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 14, 2018
  • Latest release: Jul 15, 2019
  • Number of updates: 7
  • Update frequency: every 69.7 days
  • Top authors: softmogul (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /683 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.95MB] [CPU: ▼33.67ms] Passed 4 tests

This is a short check of server-side resources used by Softmogul Booking Engine
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.50 ▼7.73
Dashboard /wp-admin3.00 ▼0.3125.87 ▼23.85
Posts /wp-admin/edit.php3.00 ▼0.3625.13 ▼26.54
Add New Post /wp-admin/post-new.php3.00 ▼2.8922.44 ▼70.03
Media Library /wp-admin/upload.php3.00 ▼0.2321.84 ▼14.26

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

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

Browser metrics Passed 4 tests

Softmogul Booking Engine: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.35 ▼0.181.87 ▼0.0145.75 ▲3.10
Dashboard /wp-admin2,214 ▲375.58 ▲0.0591.14 ▼7.5144.49 ▲1.85
Posts /wp-admin/edit.php2,113 ▲132.01 ▲0.0332.81 ▼3.4336.92 ▼0.19
Add New Post /wp-admin/post-new.php1,541 ▲1523.10 ▲0.03615.94 ▼87.8248.90 ▼4.14
Media Library /wp-admin/upload.php1,416 ▲164.20 ▲0.01101.08 ▼10.2345.36 ▼0.23

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • 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
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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/softmogul-booking-engine/softmogul_booking_engine.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

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
10 plugin tags: online booking engine, booking engine, hotels, online hotel reservation, online hotel booking...

softmogul-booking-engine/softmogul_booking_engine.php 92% from 13 tests

The main file in "Softmogul Booking Engine" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("softmogul-booking-engine.php" instead of "softmogul_booking_engine.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected87 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP216858
JavaScript12017
Markdown110012

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected