84% mphb-styles

Code Review | Hotel Booking Styles & Templates

WordPress plugin Hotel Booking Styles & Templates scored 84% from 54 tests.

About plugin

  • Plugin page: mphb-styles
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.2
  • WordPress version: 6.3.1
  • First release: Apr 9, 2020
  • Latest release: May 29, 2023
  • Number of updates: 16
  • Update frequency: every 71.6 days
  • Top authors: MotoPress (56.25%)jetmonsters (37.5%)endzevich (18.75%)

Code review

54 tests

User reviews

1 review

Install metrics

10,000+ active / 52,625 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼0.94ms] Passed 4 tests

An overview of server-side resources used by Hotel Booking Styles & Templates
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1037.57 ▼6.37
Dashboard /wp-admin3.39 ▲0.0947.58 ▼3.02
Posts /wp-admin/edit.php3.44 ▲0.0950.21 ▲5.19
Add New Post /wp-admin/post-new.php5.97 ▲0.0987.30 ▲0.69
Media Library /wp-admin/upload.php3.32 ▲0.0938.88 ▲4.94

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Hotel Booking Styles & Templates
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.17 ▼1.461.72 ▲0.2040.48 ▼3.95
Dashboard /wp-admin2,206 ▲184.85 ▲0.00109.92 ▲7.4042.99 ▲6.78
Posts /wp-admin/edit.php2,086 ▼32.03 ▼0.0035.15 ▲0.2632.04 ▼2.11
Add New Post /wp-admin/post-new.php1,543 ▲918.24 ▼5.00623.67 ▼10.9375.91 ▲11.91
Media Library /wp-admin/upload.php1,391 ▲34.27 ▲0.0595.56 ▼7.9343.95 ▼0.51

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 20× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function MPHBTemplates\\Blocks\\add_action() in wp-content/plugins/mphb-styles/includes/template-editor/includes/blocks/template.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function MPHBTemplates\\MPHB() in wp-content/plugins/mphb-styles/includes/template-editor/includes/templates.php:21
    • > PHP Warning
      Use of undefined constant MPHB_TEMPLATES_PATH - assumed 'MPHB_TEMPLATES_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mphb-styles/includes/template-editor/includes/blocks.php on line 25
    • > PHP Warning
      Use of undefined constant MPHB_TEMPLATES_PATH - assumed 'MPHB_TEMPLATES_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mphb-styles/includes/template-editor/includes/blocks.php on line 25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function MPHBTemplates\\Blocks\\add_action() in wp-content/plugins/mphb-styles/includes/template-editor/includes/blocks/title.php:14
    • > PHP Warning
      Use of undefined constant MPHB_TEMPLATES_PATH - assumed 'MPHB_TEMPLATES_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mphb-styles/includes/template-editor/includes/blocks.php on line 25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function MPHBTemplates\\Blocks\\add_action() in wp-content/plugins/mphb-styles/includes/template-editor/includes/blocks/attributes.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function MPHBTemplates\\Blocks\\add_action() in wp-content/plugins/mphb-styles/includes/template-editor/includes/blocks/wrapper.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function MPHBTemplates\\PostTypes\\add_action() in wp-content/plugins/mphb-styles/includes/template-editor/includes/post-types/template.php:10
    • > PHP Warning
      Use of undefined constant MPHB_TEMPLATES_PATH - assumed 'MPHB_TEMPLATES_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mphb-styles/includes/template-editor/includes/blocks.php on line 25

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots need descriptions #1, #2 in mphb-styles/assets to your readme.txt
You can look at the official readme.txt

mphb-styles/mphb-styles.php 92% from 13 tests

Analyzing the main PHP file in "Hotel Booking Styles & Templates" version 1.1.1
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 141 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected26,643 lines of code in 75 files:
LanguageFilesBlank linesComment linesLines of code
JSON180023,931
PHP293821041,374
JavaScript217011861
Sass4445263
CSS3330214

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity8.54
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods84
▷ Static methods00.00%
▷ Public methods5565.48%
▷ Protected methods00.00%
▷ Private methods2934.52%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin