84% mphb-divi

Code Review | Hotel Booking & Divi Integration

WordPress plugin Hotel Booking & Divi Integration scored84%from 54 tests.

About plugin

  • Plugin page: mphb-divi
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Nov 1, 2018
  • Latest release: Nov 7, 2023
  • Number of updates: 28
  • Update frequency: every 65.5 days
  • Top authors: MotoPress (60.71%)jetmonsters (42.86%)

Code review

54 tests

User reviews

3 reviews

Install metrics

2,000+ active /23,400 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.27ms] Passed 4 tests

Analyzing server-side resources used by Hotel Booking & Divi Integration
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.22 ▼7.29
Dashboard /wp-admin3.31 ▲0.0145.70 ▼6.16
Posts /wp-admin/edit.php3.36 ▲0.0047.28 ▲2.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.63 ▼13.68
Media Library /wp-admin/upload.php3.23 ▲0.0034.54 ▲2.76

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Hotel Booking & Divi Integration: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.67 ▲0.331.60 ▼0.2336.72 ▼7.39
Dashboard /wp-admin2,198 ▲215.65 ▲0.0092.53 ▼1.9839.98 ▲0.28
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0037.45 ▼5.3135.77 ▼3.77
Add New Post /wp-admin/post-new.php1,544 ▲1818.48 ▼4.50611.21 ▲4.7471.86 ▲22.87
Media Library /wp-admin/upload.php1,400 ▼04.25 ▲0.08103.14 ▼3.4941.99 ▼2.09

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • 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
Everything seems fine, however this is by no means 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
Please take a closer look at the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'DiviExtension' not found in wp-content/plugins/mphb-divi/includes/mphb.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mphb-divi/mphb-divi.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mphb-divi/includes/functions.php:123

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: booking, divi builder, hotel, property rental, reservation...

mphb-divi/mphb-divi.php Passed 13 tests

The principal PHP file in "Hotel Booking & Divi Integration" v. 1.0.8 is loaded by WordPress automatically on each request
117 characters long description:
Integrates Divi theme with the MotoPress Hotel Booking plugin to modify content and styles visually via Divi builder.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin2,452 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP14248361,403
JavaScript67565311
Sass13910289
CSS2184257
JSX119936192

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity2.18
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.28
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods47
▷ Static methods1123.40%
▷ Public methods4697.87%
▷ Protected methods00.00%
▷ Private methods12.13%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
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 images were found in this plugin