10% reservation

Code Review | Reservation

WordPress plugin Reservation scored10%from 54 tests.

About plugin

  • Plugin page: reservation
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.2
  • WordPress version: 6.3.1
  • First release: Jul 12, 2019
  • Latest release: Dec 19, 2019
  • Number of updates: 9
  • Update frequency: every 18.0 days
  • Top authors: navotarinc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,418 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > 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.49MB] [CPU: ▲2.03ms] Passed 4 tests

Analyzing server-side resources used by Reservation
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5953.57 ▲11.25
Dashboard /wp-admin3.54 ▲0.24718.22 ▲664.51
Posts /wp-admin/edit.php3.94 ▲0.5853.35 ▲5.17
Add New Post /wp-admin/post-new.php6.55 ▲0.6781.23 ▼14.92
Media Library /wp-admin/upload.php3.78 ▲0.5542.00 ▲6.61

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 65 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Reservation
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,935 ▲16414.57 ▲0.4219.71 ▲17.7044.02 ▲0.25
Dashboard /wp-admin2,234 ▲574.97 ▼0.6191.44 ▼4.8852.42 ▲2.99
Posts /wp-admin/edit.php2,123 ▲202.11 ▲0.1835.05 ▼2.4442.76 ▲6.02
Add New Post /wp-admin/post-new.php1,574 ▲4822.16 ▼0.87606.55 ▼84.7844.56 ▼17.25
Media Library /wp-admin/upload.php1,445 ▲454.55 ▲0.36100.67 ▼4.3153.21 ▲8.17

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/reservation/admin/setting/term_editor.php
  • 18× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/reservation/include/vehicle.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/reservation/include/country.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/reservation/include/vicheleList.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/reservation/include/reserve.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/reservation/css/responsive.php:114
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/reservation/admin/check.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/reservation/include/location.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/reservation/include/login.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/reservation/include/summary.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/reservation/include/createReservation.php:4

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)
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === reservation === )
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5 in reservation/assets to your readme.txt
Please take inspiration from this readme.txt

reservation/reservation.php 77% from 13 tests

This is the main PHP file of "Reservation" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Domain Path: The domain path folder was not found ("/languages")
  • Description: The description should be shorter than 140 characters (currently 168 characters long)
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected8,712 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP301,0072275,242
JavaScript5438892,377
SVG100655
CSS35110413
JSON10016
Markdown1309

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity22.75
▷ Minimum class complexity11.00
▷ Maximum class complexity46.00
Average method complexity4.22
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
11 PNG files occupy 0.70MB with 0.38MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png176.79KB57.24KB▼ 67.62%
images/2.png11.99KB5.74KB▼ 52.16%
screenshot/1.PNG34.31KB15.83KB▼ 53.85%
screenshot/2.PNG35.28KB17.95KB▼ 49.11%
screenshot/6.PNG31.97KB16.00KB▼ 49.95%