84% availability-scheduler-for-woocommerce

Code Review | Availability Scheduler for WooCommerce

WordPress plugin Availability Scheduler for WooCommerce scored 84% from 54 tests.

About plugin

  • Plugin page: availability-sche...
  • Plugin version: 1.27.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9
  • WordPress version: 6.3.1
  • First release: Apr 3, 2018
  • Latest release: Dec 30, 2018
  • Number of updates: 19
  • Update frequency: every 14.3 days
  • Top authors: azexo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 2,398 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼10.10ms] Passed 4 tests

Analyzing server-side resources used by Availability Scheduler for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0735.53 ▼16.04
Dashboard /wp-admin3.37 ▲0.0745.77 ▼1.81
Posts /wp-admin/edit.php3.42 ▲0.0646.60 ▼2.28
Add New Post /wp-admin/post-new.php5.95 ▲0.0681.48 ▼20.26
Media Library /wp-admin/upload.php3.29 ▲0.0637.34 ▲4.60

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Availability Scheduler for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲6013.37 ▼0.941.70 ▼0.4939.45 ▼9.14
Dashboard /wp-admin2,223 ▲385.83 ▲0.95114.46 ▲9.9647.30 ▼3.80
Posts /wp-admin/edit.php2,108 ▲162.04 ▲0.0640.55 ▼2.0636.93 ▲0.59
Add New Post /wp-admin/post-new.php1,529 ▲1523.19 ▲5.70663.31 ▲37.1455.42 ▲5.86
Media Library /wp-admin/upload.php1,399 ▲144.21 ▲0.0199.41 ▼1.9542.42 ▼0.66

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/availability-scheduler-for-woocommerce/azh_woo_availability_scheduler.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: product availability, availabilities, product scheduler, products visibility, show products...

availability-scheduler-for-woocommerce/azh_woo_availability_scheduler.php 85% from 13 tests

"Availability Scheduler for WooCommerce" version 1.27.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("availability-scheduler-for-woocommerce.php" instead of "azh_woo_availability_scheduler.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected271 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP198249
JavaScript202119
CSS1003

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.48
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%
Functions13
▷ Named functions538.46%
▷ Anonymous functions861.54%
Constants0
▷ Global constants00.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
No PNG files were detected