10% sports-booking-slot

Code Review | Sports Booking Slot

WordPress plugin Sports Booking Slot scored10%from 54 tests.

About plugin

  • Plugin page: sports-booking-slot
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 6.3.1
  • First release: Apr 6, 2021
  • Latest release: Apr 6, 2021
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: naim42 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /507 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

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

An overview of server-side resources used by Sports Booking Slot
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1744.09 ▲0.24
Dashboard /wp-admin3.54 ▲0.2454.15 ▼1.26
Posts /wp-admin/edit.php3.60 ▲0.2453.64 ▲4.24
Add New Post /wp-admin/post-new.php6.08 ▲0.2096.04 ▲4.03
Media Library /wp-admin/upload.php3.40 ▲0.1839.09 ▲3.14
Booking Slot Lists /wp-admin/admin.php?page=sports-booking-slot3.4035.68
Add New Slot /wp-admin/admin.php?page=sports-booking-slot&action=new3.3735.21

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 54 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
onsbks_version
sbks_installed
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Sports Booking Slot
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8113.27 ▼1.084.57 ▲2.5339.23 ▼5.00
Dashboard /wp-admin2,236 ▲485.83 ▼0.07101.96 ▼7.5839.93 ▼4.55
Posts /wp-admin/edit.php2,115 ▲262.00 ▼0.0234.63 ▼10.9836.03 ▼1.93
Add New Post /wp-admin/post-new.php1,556 ▲2323.33 ▼0.11666.67 ▲35.1254.57 ▼0.03
Media Library /wp-admin/upload.php1,415 ▲244.31 ▲0.0697.42 ▼9.8045.05 ▼0.20
Booking Slot Lists /wp-admin/admin.php?page=sports-booking-slot8822.0426.1024.64
Add New Slot /wp-admin/admin.php?page=sports-booking-slot&action=new1,2582.0425.5923.74

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 8 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • onsbks_version
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • sbks_installed

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 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
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/sports-booking-slot/includes/Frontend/views/newbook.php
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: products in wp-content/plugins/sports-booking-slot/includes/Frontend/views/newbook.php on line 27
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/sports-booking-slot/includes/Frontend/views/newbook.php on line 58
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/sports-booking-slot/includes/Frontend/views/newbook.php on line 27
    • > PHP Notice
      Undefined variable: post_metas in wp-content/plugins/sports-booking-slot/includes/Frontend/views/newbook.php on line 58
    • > PHP Fatal error
      Uncaught Error: Call to undefined function onsbks_get_product_id_title() in wp-content/plugins/sports-booking-slot/includes/Admin/views/address-new.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ONSBKS_Slots\\Includes\\Admin\\SlotList' not found in wp-content/plugins/sports-booking-slot/includes/Admin/views/address-list.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
3 plugin tags: sports-booking, games, booking-slot

sports-booking-slot/sports-booking-slot.php Passed 13 tests

"Sports Booking Slot" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
75 characters long description:
This plugin allow users to book different available slots of sports venues.

Code Analysis Passed 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 plugin2,070 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP293426891,431
CSS23412400
JavaScript22932220
JSON20019

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.30
Average class complexity6.74
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes15.26%
Methods89
▷ Static methods1516.85%
▷ Public methods8797.75%
▷ Protected methods00.00%
▷ Private methods22.25%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants6
▷ Global constants583.33%
▷ Class constants116.67%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
16 PNG files occupy 2.09MB with 1.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-9.png52.20KB26.86KB▼ 48.55%
assets/screenshot-6.png79.95KB30.55KB▼ 61.78%
assets/screenshot-11.png109.48KB55.05KB▼ 49.72%
assets/banner-1880x609.png598.20KB174.04KB▼ 70.91%
assets/icon-128x128.png24.02KB8.12KB▼ 66.18%