62% resourcexec

Code Review | Resourcexec - Resource Booking Plugin

WordPress plugin Resourcexec - Resource Booking Plugin scored 62% from 54 tests.

About plugin

  • Plugin page: resourcexec
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.6
  • WordPress version: 5.8.1
  • First release: Aug 16, 2016
  • Latest release: Apr 2, 2018
  • Number of updates: 16
  • Update frequency: every 37.1 days
  • Top authors: hitcode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,189 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.66MB] [CPU: ▼191.64ms] Passed 4 tests

An overview of server-side resources used by Resourcexec - Resource Booking Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.94 ▲0.2222.65 ▼8.27
Dashboard /wp-admin2.99 ▼0.0622.30 ▼38.75
Posts /wp-admin/edit.php2.99 ▼0.1126.52 ▼25.56
Add New Post /wp-admin/post-new.php2.99 ▼2.4420.68 ▼676.01
Media Library /wp-admin/upload.php2.99 ▼0.0117.83 ▼26.25
Agenda /wp-admin/admin.php?page=hcrb&hca=agenda2.9918.36
Settings /wp-admin/admin.php?page=hcrb&hca=conf2.9918.55
Reports /wp-admin/admin.php?page=hcrb&hca=reports2.9917.98
Resources /wp-admin/admin.php?page=hcrb&hca=resources2.9919.54
Calendar /wp-admin/admin.php?page=hcrb&hca=calendar2.9920.20

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 388 new files
Database: 5 new tables, no new options
New tables
wp_hcrb_v1_bookings
wp_hcrb_v1_conf
wp_hcrb_v1_resources
wp_hcrb_v1_migrations
wp_hcrb_v1_relations

Browser metrics Passed 4 tests

This is an overview of browser requirements for Resourcexec - Resource Booking Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,781 ▲18515.64 ▲0.4511.49 ▼0.7456.83 ▼15.42
Dashboard /wp-admin3,019 ▲665.89 ▼0.05189.79 ▲9.58156.71 ▲8.67
Posts /wp-admin/edit.php2,786 ▲472.58 ▼0.1078.60 ▼17.44113.72 ▲5.43
Add New Post /wp-admin/post-new.php1,723 ▲10814.70 ▼6.15391.93 ▼66.13115.55 ▼27.47
Media Library /wp-admin/upload.php1,794 ▼135.03 ▼0.01175.43 ▼16.78162.80 ▼0.83
Agenda /wp-admin/admin.php?page=hcrb&hca=agenda9941.8541.1258.01
Settings /wp-admin/admin.php?page=hcrb&hca=conf1,0351.8634.3851.22
Reports /wp-admin/admin.php?page=hcrb&hca=reports1,0262.1141.1667.13
Resources /wp-admin/admin.php?page=hcrb&hca=resources9612.1153.7865.07
Calendar /wp-admin/admin.php?page=hcrb&hca=calendar1,1062.1135.5246.59

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/resourcexec/happ2/hsystem/parts/profiler.php+121
    Array and string offset access syntax with curly braces is deprecated
  • Zombie tables were found after uninstall: 5 tables
    • wp_hcrb_v1_resources
    • wp_hcrb_v1_migrations
    • wp_hcrb_v1_bookings
    • wp_hcrb_v1_conf
    • wp_hcrb_v1_relations

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 15 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=hcrb&hca=calendar
    • > Deprecated in wp-content/plugins/resourcexec/happ2/hsystem/parts/profiler.php+595
    Array and string offset access syntax with curly braces is deprecated
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=hcrb&hca=calendar
    • > Warning in wp-content/plugins/resourcexec/happ2/hsystem/parts/orm/storable_wp_custom_post.php+60
    "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=hcrb&hca=calendar
    • > Warning in wp-content/plugins/resourcexec/happ2/modules/session/lib.php+86
    session_start(): Cannot start session when headers already sent
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=hcrb&hca=calendar
    • > Warning in wp-content/plugins/resourcexec/happ2/modules/session/lib.php+630
    Cannot modify header information - headers already sent by (output started at wp-admin/includes/misc.php:1281)
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=hcrb&hca=calendar
    • > Notice in wp-content/plugins/resourcexec/happ2/modules/session/lib.php+347
    Undefined variable: _SESSION
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=hcrb&hca=calendar
    • > Warning in wp-content/plugins/resourcexec/happ2/modules/session/lib.php+347
    Invalid argument supplied for foreach()
  • 21 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=hcrb&hca=reports
    • > Warning in wp-content/plugins/resourcexec/happ2/hsystem/parts/orm/relations.php+105
    count(): Parameter must be an array or an object that implements Countable
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=hcrb&hca=resources
    • > Deprecated in wp-content/plugins/resourcexec/happ2/modules/html/view_sorted_table.php+127
    Function create_function() is deprecated

SRP 50% 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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/resourcexec/happ2/hsystem/parts/orm/storable_wp_custom_post.php on line 60

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=hcrb&hca=calendar
    • > Network (severe)
    wp-content/plugins/happ2/assets/css/hc-wp.css?ver=5.8.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=hcrb&hca=calendar
    • > Network (severe)
    wp-content/plugins/happ2/assets/js/hc2.js?ver=5.8.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=hcrb&hca=calendar
    • > Network (severe)
    wp-content/plugins/happ2/assets/js/hc-datepicker2.js?ver=5.8.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
Please take inspiration from this readme.txt

resourcexec/resourcexec.php Passed 13 tests

The principal PHP file in "Resourcexec - Resource Booking Plugin" v. 1.0.2 is loaded by WordPress automatically on each request
82 characters long description:
Resource booking, resource scheduling, staff management, employee planning plugin.

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
Good job! No executable or dangerous file extensions detected28,808 lines of code in 369 files:
LanguageFilesBlank linesComment linesLines of code
PHP3635,0476,20626,517
JavaScript22111382,092
Markdown2650141
CSS291358

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity10.96
▷ Minimum class complexity1.00
▷ Maximum class complexity252.00
Average method complexity3.19
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces3
Traits0
Classes332
▷ Abstract classes123.61%
▷ Concrete classes32096.39%
▷ Final classes00.00%
Methods1,544
▷ Static methods462.98%
▷ Public methods1,38789.83%
▷ Protected methods1308.42%
▷ Private methods271.75%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.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 files were detected