94% callbook-mobile-bar

Code Review | Call&Book Mobile Bar

WordPress plugin Call&Book Mobile Bar scored 94% from 54 tests.

About plugin

  • Plugin page: callbook-mobile-bar
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.9.8
  • WordPress version: 5.8.1
  • First release: Jul 11, 2015
  • Latest release: Oct 29, 2018
  • Number of updates: 50
  • Update frequency: every 24.1 days
  • Top authors: msalerno82 (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

2,000+ active / 17,018 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼141.44ms] Passed 4 tests

Server-side resources used by Call&Book Mobile Bar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0229.17 ▲4.24
Dashboard /wp-admin3.11 ▲0.0532.24 ▼3.02
Posts /wp-admin/edit.php3.16 ▲0.0529.89 ▼0.70
Add New Post /wp-admin/post-new.php5.47 ▲0.0372.73 ▼562.48
Media Library /wp-admin/upload.php3.05 ▲0.0524.60 ▲0.45
Call & Book Mobile Bar /wp-admin/options-general.php?page=cb_settings3.0625.43

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Call&Book Mobile Bar: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,860 ▲25916.08 ▲0.109.11 ▲4.2275.55 ▲2.00
Dashboard /wp-admin2,940 ▲456.10 ▼0.09116.81 ▼23.02167.49 ▼16.03
Posts /wp-admin/edit.php2,750 ▲73.24 ▲0.0163.82 ▼0.19138.42 ▼0.56
Add New Post /wp-admin/post-new.php3,743 ▲820.64 ▲1.94437.70 ▼9.07158.13 ▼8.96
Media Library /wp-admin/upload.php1,762 ▲105.53 ▼0.01145.48 ▲4.38184.29 ▲0.95
Call & Book Mobile Bar /wp-admin/options-general.php?page=cb_settings5,1673.6797.36144.20

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=cb_settings
    • > Network (severe)
    http://fonts.googleapis.com/css?family= - Failed to load resource: the server responded with a status of 400 (Bad Request)

Optimizations

Plugin configuration 93% from 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
7 plugin tags: hotel booking, hotel, call, booking, booking engine...

callbook-mobile-bar/call-and-book.php 85% from 13 tests

This is the main PHP file of "Call&Book Mobile Bar" version 1.2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 388 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("callbook-mobile-bar.php" instead of "call-and-book.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected685 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP212978407
CSS2321162
PO File1425196
SVG10018
JavaScript2002

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin