90% waiteraid-booking

Code Review | WaiterAid Booking

WordPress plugin WaiterAid Booking scored90%from 54 tests.

About plugin

  • Plugin page: waiteraid-booking
  • Plugin version: 1.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.6
  • WordPress version: 6.3.1
  • First release: Feb 5, 2021
  • Latest release: Feb 24, 2021
  • Number of updates: 4
  • Update frequency: every 5.0 days
  • Top authors: waiteraid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /451 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼5.66ms] Passed 4 tests

Server-side resources used by WaiterAid Booking
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2038.54 ▼7.44
Dashboard /wp-admin3.49 ▲0.1847.72 ▼0.04
Posts /wp-admin/edit.php3.60 ▲0.2546.47 ▼8.22
Add New Post /wp-admin/post-new.php6.09 ▲0.2187.17 ▼6.92
Media Library /wp-admin/upload.php3.41 ▲0.1835.94 ▲4.67

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 33 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
waiteraid_options
widget_waiteraid_sidebar_widget
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WaiterAid Booking
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7914.25 ▲0.043.11 ▲1.5141.61 ▼5.61
Dashboard /wp-admin2,217 ▲375.60 ▼0.0783.49 ▼17.6137.02 ▼12.28
Posts /wp-admin/edit.php2,098 ▼71.98 ▲0.0235.63 ▼8.7032.37 ▼6.24
Add New Post /wp-admin/post-new.php6,207 ▲4,67618.97 ▼4.22856.52 ▲243.2795.90 ▲16.39
Media Library /wp-admin/upload.php1,413 ▲134.20 ▲0.0198.41 ▼3.8140.48 ▼4.27

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_waiteraid_sidebar_widget
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 97% 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 require attention:
  • Donate link: Invalid url: "N/A"
The official readme.txt is a good inspiration

waiteraid-booking/waiteraid-booking.php Passed 13 tests

The main PHP script in "WaiterAid Booking" version 1.1 is automatically included on every request by WordPress
17 characters long description:
WaiterAid Booking

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
Success! There were no dangerous files found in this plugin2,569 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP163385581,730
JavaScript699148635
CSS23812204

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity24.67
▷ Minimum class complexity1.00
▷ Maximum class complexity75.00
Average method complexity4.30
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods43
▷ Static methods24.65%
▷ Public methods3683.72%
▷ Protected methods00.00%
▷ Private methods716.28%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin