10% escape-rooms

Code Review | Escape Rooms

WordPress plugin Escape Rooms scored10%from 54 tests.

About plugin

  • Plugin page: escape-rooms
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.1-4.1.1
  • WordPress version: 6.3.1
  • First release: Apr 7, 2015
  • Latest release: Apr 8, 2015
  • Number of updates: 14
  • Update frequency: every 0.1 days
  • Top authors: Simosf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,677 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/escape-rooms/escape-rooms-ii.php+308
    Undefined variable: wp_error

Server metrics [RAM: ▼0.71MB] [CPU: ▼25.08ms] Passed 4 tests

A check of server-side resources used by Escape Rooms
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▼0.0034.62 ▼10.83
Dashboard /wp-admin3.29 ▼0.0540.00 ▼23.47
Posts /wp-admin/edit.php3.33 ▼0.0345.03 ▼2.40
Add New Post /wp-admin/post-new.php3.14 ▼2.7435.88 ▼63.62
Media Library /wp-admin/upload.php3.28 ▲0.0538.24 ▲3.11
Hours /wp-admin/edit-tags.php?taxonomy=Hours&post_type=escaperoom3.2735.52
All Bookings /wp-admin/edit.php?post_type=erbooking3.3238.53
Add New /wp-admin/post-new.php?post_type=erbooking3.1433.41
All Escape Rooms /wp-admin/edit.php?post_type=escaperoom3.3235.53
Add New /wp-admin/post-new.php?post_type=escaperoom3.1434.09

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Escape Rooms
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲11813.24 ▼1.131.98 ▲0.0543.00 ▲0.68
Dashboard /wp-admin2,267 ▲795.86 ▲0.74108.27 ▼12.2440.15 ▼1.04
Posts /wp-admin/edit.php2,147 ▲582.01 ▲0.0135.61 ▼1.4230.25 ▼5.10
Add New Post /wp-admin/post-new.php1,563 ▲4117.83 ▼5.12666.72 ▲70.3853.75 ▼12.57
Media Library /wp-admin/upload.php1,440 ▲494.23 ▲0.0295.56 ▼4.4643.93 ▼0.72
Hours /wp-admin/edit-tags.php?taxonomy=Hours&post_type=escaperoom1,3172.1426.4227.32
All Bookings /wp-admin/edit.php?post_type=erbooking1,1081.9933.5528.39
Add New /wp-admin/post-new.php?post_type=erbooking1,5312.5251.9647.24
All Escape Rooms /wp-admin/edit.php?post_type=escaperoom1,1171.9334.1530.21
Add New /wp-admin/post-new.php?post_type=escaperoom2,7929.11188.7675.16

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=escaperoom
    • > Notice in wp-content/plugins/escape-rooms/escape-rooms-ii.php+109
    Undefined index: price1
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=escaperoom
    • > Notice in wp-content/plugins/escape-rooms/escape-rooms-ii.php+110
    Undefined index: price2
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=escaperoom
    • > Notice in wp-content/plugins/escape-rooms/escape-rooms-ii.php+111
    Undefined index: price3
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=escaperoom
    • > Notice in wp-content/plugins/escape-rooms/escape-rooms-ii.php+112
    Undefined index: price4
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=escaperoom
    • > Notice in wp-content/plugins/escape-rooms/escape-rooms-ii.php+113
    Undefined index: price5
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=escaperoom
    • > Notice in wp-content/plugins/escape-rooms/escape-rooms-ii.php+114
    Undefined index: price6
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=escaperoom
    • > Notice in wp-content/plugins/escape-rooms/escape-rooms-ii.php+115
    Undefined index: price7
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=escaperoom
    • > Notice in wp-content/plugins/escape-rooms/escape-rooms-ii.php+116
    Undefined index: price8
  • 32 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=escaperoom
    • > Notice in wp-content/plugins/escape-rooms/escape-rooms-ii.php+279
    Trying to get property 'ID' of non-object
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=escaperoom
    • > Notice in wp-content/plugins/escape-rooms/escape-rooms-ii.php+141
    Undefined index: difficulty
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=escaperoom
    • > Notice in wp-content/plugins/escape-rooms/escape-rooms-ii.php+142
    Undefined index: terms
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=escaperoom
    • > Notice in wp-content/plugins/escape-rooms/escape-rooms-ii.php+143
    Undefined index: tagline
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=escaperoom
    • > Notice in wp-content/plugins/escape-rooms/escape-rooms-ii.php+267
    Undefined index: fullname
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=escaperoom
    • > Notice in wp-content/plugins/escape-rooms/escape-rooms-ii.php+268
    Undefined index: hours
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=escaperoom
    • > Notice in wp-content/plugins/escape-rooms/escape-rooms-ii.php+269
    Undefined index: telephone
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=escaperoom
    • > Notice in wp-content/plugins/escape-rooms/escape-rooms-ii.php+270
    Undefined index: email
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=escaperoom
    • > Notice in wp-content/plugins/escape-rooms/escape-rooms-ii.php+271
    Undefined index: datestamp
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=escaperoom
    • > Notice in wp-content/plugins/escape-rooms/escape-rooms-ii.php+272
    Undefined index: escaperoom
  • 16 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=escaperoom
    • > Notice in wp-content/plugins/escape-rooms/escape-rooms-ii.php+143
    Trying to access array offset on value of type null

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
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined index: roomId in wp-content/plugins/escape-rooms/html_detailRooms.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/escape-rooms/html_listRooms.php:11
    • > PHP Notice
      Undefined index: roomId in wp-content/plugins/escape-rooms/html_booking.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/escape-rooms/escape-rooms-ii.php:12

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === escape-rooms === )
You can look at the official readme.txt

escape-rooms/escape-rooms-ii.php 85% from 13 tests

The main PHP script in "Escape Rooms" version 1.0.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 244 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("escape-rooms.php" instead of "escape-rooms-ii.php")

Code Analysis Passed 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
No dangerous file extensions were detected449 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP413139449

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin