74% time-slots-for-woocommerce

Code Review | Time Slots for WooCommerce

WordPress plugin Time Slots for WooCommerce scored 74% from 54 tests.

About plugin

  • Plugin page: time-slots-for-wo...
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.8.2
  • WordPress version: 5.9.2
  • First release: Oct 8, 2019
  • Latest release: Nov 11, 2021
  • Number of updates: 15
  • Update frequency: every 51.1 days
  • Top authors: colbyalbo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 966 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼293.38ms] Passed 4 tests

This is a short check of server-side resources used by Time Slots for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0151.41 ▼0.67
Dashboard /wp-admin3.43 ▲0.0332.64 ▼1.17
Posts /wp-admin/edit.php3.66 ▲0.0239.84 ▼5.81
Add New Post /wp-admin/post-new.php6.93 ▼0.0790.87 ▼1,165.85
Media Library /wp-admin/upload.php3.31 ▲0.0224.31 ▲0.47
Time Slots /wp-admin/admin.php?page=time-slots-options-page3.3122.95

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 1 new option
New WordPress options
ebxwcts_option_settings

Browser metrics Passed 4 tests

A check of browser resources used by Time Slots for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,797 ▲7516.14 ▲0.376.00 ▼0.542.85 ▲0.59
Dashboard /wp-admin2,894 ▲336.14 ▼0.03115.70 ▼16.55150.96 ▼6.12
Posts /wp-admin/edit.php2,696 ▲23.24 ▲0.0063.39 ▼1.41143.16 ▲1.42
Add New Post /wp-admin/post-new.php1,670 ▼11118.91 ▼3.79384.70 ▼30.38156.58 ▼3.87
Media Library /wp-admin/upload.php1,700 ▲25.53 ▲0.02142.52 ▼0.72184.76 ▲0.87
Time Slots /wp-admin/admin.php?page=time-slots-options-page2,4882.3953.82155.06

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/time-slots-for-woocommerce/uninstall.php+11
    Undefined index: ebxwcts_remove_data
  • The uninstall procedure has failed, leaving 1 option in the database
    • ebxwcts_option_settings

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/time-slots-for-woocommerce/includes/settings-instructions.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/time-slots-for-woocommerce/admin/loader/plugin-dependancy.php:46

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
6 plugin tags: booking, appointments, consulting, paid calls, woocommerce...

time-slots-for-woocommerce/wc-time-slots.php 92% from 13 tests

The principal PHP file in "Time Slots for WooCommerce" v. 1.0.4 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("time-slots-for-woocommerce.php" instead of "wc-time-slots.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin843 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP1363126743
CSS1213100

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/time-slots-logo.png4.76KB2.54KB▼ 46.73%