Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
- The plugin did not install without errors
- > Deprecated in wp-content/plugins/cbx-restaurant-booking/includes/class-cbxrbooking-mailtemplate.php+155
Array and string offset access syntax with curly braces is deprecated
Server metrics [RAM: ▲0.00MB] [CPU: ▼5.11ms] Passed 4 tests
An overview of server-side resources used by CBX Restaurant Booking
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 35.65 ▼6.51 |
Dashboard /wp-admin | 3.31 ▲0.00 | 46.15 ▼2.73 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 44.16 ▼4.12 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 85.66 ▼7.06 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 37.57 ▲2.40 |
Server storage [IO: ▲3.88MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 346 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-posts |
theysaidso_admin_options |
widget_recent-comments |
db_upgraded |
Browser metrics Passed 4 tests
A check of browser resources used by CBX Restaurant Booking
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲65 | 13.17 ▼1.19 | 1.82 ▼0.31 | 36.12 ▼7.66 |
Dashboard /wp-admin | 2,209 ▲27 | 4.87 ▼1.00 | 101.36 ▼4.38 | 39.30 ▲0.26 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 2.04 ▲0.03 | 35.75 ▲0.85 | 30.39 ▼6.25 |
Add New Post /wp-admin/post-new.php | 1,533 ▼0 | 23.65 ▲0.18 | 594.05 ▼47.54 | 45.81 ▼14.13 |
Media Library /wp-admin/upload.php | 1,385 ▼3 | 4.22 ▲0.02 | 101.32 ▲4.39 | 42.68 ▼0.30 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
- Zombie WordPress options were found after uninstall: 6 options
- widget_recent-comments
- db_upgraded
- widget_recent-posts
- can_compress_scripts
- widget_theysaidso_widget
- theysaidso_admin_options
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected
SRP 0% 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
- 2× PHP files output text when accessed directly:
- > /wp-content/plugins/cbx-restaurant-booking/includes/fpdf/formatedstring.php
- > /wp-content/plugins/cbx-restaurant-booking/includes/fpdf/easyTable.php
- 7× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cbx-restaurant-booking/includes/class-cbxrbooking-branch-manager.php on line 4
- > PHP Warning
require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/cbx-restaurant-booking/includes/class-cbxrbooking-branch-manager.php on line 4
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cbx-restaurant-booking/includes/class-cbxrbooking-log.php on line 4
- > PHP Warning
require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/cbx-restaurant-booking/includes/class-cbxrbooking-log.php on line 4
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/cbx-restaurant-booking/includes/class-cbxrbooking-branch-manager.php on line 4
- > PHP Fatal error
Uncaught Error: Class 'FPDF' not found in wp-content/plugins/cbx-restaurant-booking/includes/fpdf/exfpdf.php:11
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/cbx-restaurant-booking/includes/class-cbxrbooking-log.php on line 4
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: restaurant, booking, restaurant booking, table booking, restaurant reservations
cbx-restaurant-booking/cbxrbooking.php 85% from 13 tests
This is the main PHP file of "CBX Restaurant Booking" version 1.2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
- Main file name: Name the main plugin file the same as the plugin slug ("cbx-restaurant-booking.php" instead of "cbxrbooking.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin64,460 lines of code in 304 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 30 | 3,501 | 458 | 24,531 |
JavaScript | 143 | 4,609 | 2,289 | 20,035 |
PHP | 55 | 2,914 | 3,741 | 14,386 |
TypeScript | 68 | 5 | 0 | 3,508 |
Sass | 4 | 175 | 2 | 1,013 |
SVG | 2 | 0 | 0 | 547 |
JSON | 1 | 0 | 0 | 435 |
LESS | 1 | 1 | 5 | 5 |
PHP code 50% from 2 tests
A short review of cyclomatic complexity and code structure
These items need your attention
- Please reduce cyclomatic complexity of methods to less than 100 (currently 114)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.39 |
Average class complexity | 79.21 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 338.00 |
Average method complexity | 4.96 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 114.00 |
Code structure | ||
---|---|---|
Namespaces | 2 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 28 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 28 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 540 | |
▷ Static methods | 48 | 8.89% |
▷ Public methods | 451 | 83.52% |
▷ Protected methods | 43 | 7.96% |
▷ Private methods | 46 | 8.52% |
Functions | 13 | |
▷ Named functions | 8 | 61.54% |
▷ Anonymous functions | 5 | 38.46% |
Constants | 22 | |
▷ Global constants | 8 | 36.36% |
▷ Class constants | 14 | 63.64% |
▷ Public constants | 14 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
10 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/sort_asc.png | 0.16KB | 0.25KB | 0.00% |
assets/images/cbxbooking_menu_icon.png | 0.68KB | 0.80KB | 0.00% |
assets/images/icon_move.png | 0.22KB | 0.22KB | ▼ 0.89% |
assets/images/sort_desc.png | 0.15KB | 0.25KB | 0.00% |
assets/images/sort_desc_disabled.png | 0.14KB | 0.25KB | 0.00% |