68% my-reservation-system

Code Review | My Reservation System

WordPress plugin My Reservation System scored 68% from 54 tests.

About plugin

  • Plugin page: my-reservation-sy...
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.8.1
  • WordPress version: 5.8.1
  • First release: Aug 25, 2016
  • Latest release: Sep 12, 2021
  • Number of updates: 22
  • Update frequency: every 83.8 days
  • Top authors: Myreserv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 7,873 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.64MB] [CPU: ▼214.12ms] Passed 4 tests

Server-side resources used by My Reservation System
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.99 ▼0.739.49 ▼11.27
Dashboard /wp-admin2.01 ▼1.0418.61 ▼26.49
Posts /wp-admin/edit.php2.01 ▼1.1010.26 ▼32.68
Add New Post /wp-admin/post-new.php2.01 ▼3.4210.22 ▼778.09
Media Library /wp-admin/upload.php2.01 ▼0.999.66 ▼19.22

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 1 new option
New WordPress options
widget_my_reservation_system

Browser metrics Passed 4 tests

An overview of browser requirements for My Reservation System
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,681 ▲8516.25 ▲0.228.52 ▼3.6345.47 ▼1.99
Dashboard /wp-admin2,970 ▲365.92 ▼0.07148.68 ▼15.71116.05 ▲4.91
Posts /wp-admin/edit.php2,739 ▼02.71 ▲0.0179.00 ▲11.1191.68 ▲1.99
Add New Post /wp-admin/post-new.php1,500 ▼018.51 ▼0.27410.57 ▲6.93103.93 ▼0.39
Media Library /wp-admin/upload.php1,807 ▲625.04 ▲0.02184.25 ▲26.77120.31 ▲5.55

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5304
    The called constructor method for WP_Widget in my_reservation_system_widget is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_my_reservation_system

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/my-reservation-system/preview.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/my-reservation-system/my-reservation-system.php:11
    • > PHP Notice
      Undefined index: val in wp-content/plugins/my-reservation-system/preview.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (My Reservation System Dashboard), #2 (Booking Manager inside My Reservation System), #3 (Plugin Interface inside Wordpress Dashboard), #4 (Plugin Interface inside into Wordpress Frontend), #5 (New Plugin Interface 2.3)
  • Requires php: Invalid version format
You can take inspiration from this readme.txt

my-reservation-system/my-reservation-system.php 92% from 13 tests

The entry point to "My Reservation System" version 2.3 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 356 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin1,012 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP2415440
JavaScript3435348
CSS235224

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity69.00
▷ Minimum class complexity69.00
▷ Maximum class complexity69.00
Average method complexity7.18
▷ Minimum method complexity2.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 methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
13 PNG files occupy 0.40MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png139.29KB51.12KB▼ 63.30%
images/edit-icon.png0.30KB0.42KB0.00%
images/close-bt.png1.50KB1.39KB▼ 7.56%
images/web-icon.png0.92KB0.85KB▼ 7.55%
screenshot-3.png25.84KB11.21KB▼ 56.63%