84% reservation-studio-widget

Code Review | Reservation.Studio widget

WordPress plugin Reservation.Studio widget scored84%from 54 tests.

About plugin

  • Plugin page: reservation-studi...
  • Plugin version: 1.0.13
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 13, 2022
  • Latest release: Jul 27, 2023
  • Number of updates: 20
  • Update frequency: every 20.6 days
  • Top authors: veneliniliev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /496 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.26ms] Passed 4 tests

This is a short check of server-side resources used by Reservation.Studio widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.26 ▼0.23
Dashboard /wp-admin3.33 ▲0.0243.67 ▼3.34
Posts /wp-admin/edit.php3.38 ▲0.0246.53 ▼2.98
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.54 ▲1.51
Media Library /wp-admin/upload.php3.25 ▲0.0239.57 ▲4.08

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 92 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Reservation.Studio widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,856 ▲11014.28 ▼0.071.94 ▲0.4342.18 ▼5.48
Dashboard /wp-admin2,237 ▲595.51 ▼0.2079.70 ▼29.1672.95 ▲29.10
Posts /wp-admin/edit.php2,148 ▲481.98 ▼0.0239.21 ▲0.4233.76 ▼4.54
Add New Post /wp-admin/post-new.php1,728 ▲20224.37 ▲1.43734.36 ▲47.3956.19 ▼4.70
Media Library /wp-admin/upload.php1,436 ▲334.20 ▼0.1199.97 ▲2.1589.19 ▲43.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 47× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Rakit\\Validation\\Rule' not found in wp-content/plugins/reservation-studio-widget/vendor/rakit/validation/src/Rules/Ipv6.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Rakit\\Validation\\Rule' not found in wp-content/plugins/reservation-studio-widget/vendor/rakit/validation/src/Rules/Email.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Rakit\\Validation\\Rule' not found in wp-content/plugins/reservation-studio-widget/vendor/rakit/validation/src/Rules/In.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Rakit\\Validation\\Rule' not found in wp-content/plugins/reservation-studio-widget/vendor/rakit/validation/src/Rules/Lowercase.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Rakit\\Validation\\Rule' not found in wp-content/plugins/reservation-studio-widget/vendor/rakit/validation/src/Rules/AlphaDash.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Rakit\\Validation\\Rule' not found in wp-content/plugins/reservation-studio-widget/vendor/rakit/validation/src/Rules/Digits.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Rakit\\Validation\\Rule' not found in wp-content/plugins/reservation-studio-widget/vendor/rakit/validation/src/Rules/Nullable.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Rakit\\Validation\\Rule' not found in wp-content/plugins/reservation-studio-widget/vendor/rakit/validation/src/Rules/Json.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Rakit\\Validation\\Rule' not found in wp-content/plugins/reservation-studio-widget/vendor/rakit/validation/src/Rules/Present.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Rakit\\Validation\\Rule' not found in wp-content/plugins/reservation-studio-widget/vendor/rakit/validation/src/Rules/TypeArray.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt is a good inspiration

reservation-studio-widget/widget.php 92% from 13 tests

The entry point to "Reservation.Studio widget" version 1.0.13 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("reservation-studio-widget.php" instead of "widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin5,100 lines of code in 84 files:
LanguageFilesBlank linesComment linesLines of code
PHP758941,7864,082
Markdown23750800
JSON30096
CSS118087
SVG20025
XML13410

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity6.70
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces2
Traits5
Classes59
▷ Abstract classes11.69%
▷ Concrete classes5898.31%
▷ Final classes00.00%
Methods248
▷ Static methods2911.69%
▷ Public methods21385.89%
▷ Protected methods3112.50%
▷ Private methods41.61%
Functions5
▷ Named functions120.00%
▷ Anonymous functions480.00%
Constants0
▷ Global constants00.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/laptop.png0.64KB0.64KB0.00%