10% wp-time-slots-availability-calendar

Code Review | WP Time Slots

WordPress plugin WP Time Slots scored 10% from 54 tests.

About plugin

  • Plugin page: wp-time-slots-ava...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8
  • WordPress version: 5.8.1
  • First release: Sep 28, 2012
  • Latest release: Dec 5, 2016
  • Number of updates: 30
  • Update frequency: every 57.3 days
  • Top authors: bryght (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 4,977 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/wp-time-slots-availability-calendar/php/widget.php+8
    Methods with the same name as their class will not be constructors in a future version of PHP; tsa_widget has a deprecated constructor

Server metrics [RAM: ▼0.09MB] [CPU: ▼150.40ms] Passed 4 tests

Analyzing server-side resources used by WP Time Slots
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0236.92 ▲7.99
Dashboard /wp-admin3.08 ▲0.0335.97 ▼13.50
Posts /wp-admin/edit.php3.14 ▲0.0345.77 ▲1.08
Add New Post /wp-admin/post-new.php4.99 ▼0.4474.48 ▼587.06
Media Library /wp-admin/upload.php3.03 ▲0.0334.62 ▼2.10
Add New /wp-admin/admin.php?page=wp-time-slots-add-new3.0628.51
Settings /wp-admin/admin.php?page=wp-time-slots-settings3.0328.84
Calendars /wp-admin/admin.php?page=wp-time-slots3.0429.70

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 24 new files
Database: no new tables, 1 new option
New WordPress options
widget_tsa_widget

Browser metrics Passed 4 tests

Checking browser requirements for WP Time Slots
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,840 ▲23416.20 ▲0.6113.81 ▲4.8845.82 ▲1.44
Dashboard /wp-admin3,015 ▲815.92 ▼0.03144.91 ▼12.02106.69 ▼1.96
Posts /wp-admin/edit.php2,784 ▲452.72 ▲0.0068.36 ▼4.9290.19 ▲0.41
Add New Post /wp-admin/post-new.php1,746 ▼2,05021.05 ▲5.59350.33 ▼135.74112.05 ▲4.35
Media Library /wp-admin/upload.php1,852 ▲455.07 ▲0.03154.17 ▼9.42125.46 ▲3.78
Add New /wp-admin/admin.php?page=wp-time-slots-add-new1,5022.2161.9181.78
Settings /wp-admin/admin.php?page=wp-time-slots-settings1,0902.0958.2671.21
Calendars /wp-admin/admin.php?page=wp-time-slots1,1322.2460.2769.55

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
These items require your attention
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_tsa_widget

Smoke tests 75% 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 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
The following issues need your attention
  • 14× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-time-slots-availability-calendar/views/edit-calendar.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-time-slots-availability-calendar/php/widget.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-time-slots-availability-calendar/views/calendar-settings.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-time-slots-availability-calendar/php/add-calendar.php:8
    • > PHP Notice
      Undefined index: calendarString in wp-content/plugins/wp-time-slots-availability-calendar/php/save-calendar.php on line 8
    • > PHP Notice
      Undefined variable: currentTimestamp in wp-content/plugins/wp-time-slots-availability-calendar/php/show-calendar.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-time-slots-availability-calendar/views/add-calendar.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-time-slots-availability-calendar/php/delete-calendar.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-time-slots-availability-calendar/php/save-calendar.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-time-slots-availability-calendar/views/calendar-list.php:16

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (How it looks on your site), #2 (How it looks in your WordPress admin panel)
You can take inspiration from this readme.txt

wp-time-slots-availability-calendar/wp-time-slots-availability-calendar.php Passed 13 tests

The entry point to "WP Time Slots" version 1.4 is a PHP file that has certain tags in its header comment area
50 characters long description:
WP Time Slots Availability Calendar - Free version

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
Everything looks great! No dangerous files found in this plugin917 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP1212163630
JavaScript24910150
PO File14244102
CSS216035

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/tsa-right.png1.06KB0.26KB▼ 75.53%
images/tsa-left.png1.06KB0.26KB▼ 75.87%