73% easyreservations

Code Review | easyReservations

WordPress plugin easyReservations scored 73% from 54 tests.

About plugin

  • Plugin page: easyreservations
  • Plugin version: 6.0-alpha.22
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.7
  • WordPress version: 5.8.1
  • First release: Aug 11, 2011
  • Latest release: Jun 8, 2021
  • Number of updates: 356
  • Update frequency: every 10.1 days
  • Top authors: feryaz (100%)

Code review

54 tests

User reviews

61 reviews

Install metrics

3,000+ active / 212,548 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲5.46MB] [CPU: ▼101.17ms] 75% from 4 tests

Server-side resources used by easyReservations
Please have a look at the following items
  • Extra RAM: The extra memory usage must be under 5MB (currently 5.46MB on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /9.56 ▲6.8495.16 ▲72.41
Dashboard /wp-admin8.60 ▲5.5469.66 ▲20.37
Posts /wp-admin/edit.php8.67 ▲5.5681.97 ▲38.69
Add New Post /wp-admin/post-new.php10.62 ▲5.19141.55 ▼536.14
Media Library /wp-admin/upload.php8.54 ▲5.53129.62 ▲90.98

Server storage [IO: ▲5.78MB] [DB: ▲0.03MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 476 new files
Database: 5 new tables, 51 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for easyReservations
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,941 ▲34516.46 ▲0.9828.67 ▲11.2050.51 ▼12.18
Dashboard /wp-admin3,050 ▲1195.91 ▲0.00147.30 ▲0.78141.63 ▲23.46
Posts /wp-admin/edit.php2,807 ▲682.70 ▲0.0269.53 ▲2.8094.70 ▲2.64
Add New Post /wp-admin/post-new.php1,642 ▲3817.54 ▼1.41570.16 ▲140.83190.67 ▲65.01
Media Library /wp-admin/upload.php1,816 ▲94.99 ▼0.01216.81 ▲51.64211.26 ▲73.84

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_receipt_itemmeta
    • wp_reservationmeta
  • Zombie WordPress options detected upon uninstall: 11 options
    • reservations_reservation_item_label
    • widget_easyreservations_widget_cart
    • reservations_default_location
    • widget_easyreservations_products
    • reservations_admin_notices
    • reservations_meta_box_errors
    • reservations_block_before
    • reservations_strict_time
    • reservations_schema_version
    • resource_cat_children
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/easyreservations/templates/checkout/submit.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/easyreservations/templates/single-resource/form.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found


Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

easyreservations/easyReservations.php 77% from 13 tests

The entry point to "easyReservations" version 6.0-alpha.22 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("easyreservations.php" instead of "easyReservations.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Version: Use periods and digits only for your plugin's version number (ex. "1.0.3" instead of "6.0-alpha.22")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected93,453 lines of code in 451 files:
LanguageFilesBlank linesComment linesLines of code

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 102)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity26.71
▷ Minimum class complexity1.00
▷ Maximum class complexity330.00
Average method complexity3.37
▷ Minimum method complexity1.00
▷ Maximum method complexity102.00
Code structure
▷ Abstract classes2213.66%
▷ Concrete classes13986.34%
▷ Final classes32.16%
▷ Static methods36519.56%
▷ Public methods1,60485.96%
▷ Protected methods19910.66%
▷ Private methods633.38%
▷ Named functions35698.07%
▷ Anonymous functions71.93%
▷ Global constants1433.33%
▷ Class constants2866.67%
▷ Public constants28100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
15 PNG files occupy 0.37MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-6.png19.56KB7.73KB▼ 60.49%
assets/images/toolbar.png3.10KB0.53KB▼ 82.97%
screenshot-4.png22.63KB7.68KB▼ 66.06%
screenshot-1.png62.27KB23.64KB▼ 62.04%