89% scheduled-products-for-woocommerce

Code Review | Scheduled Products for WooCommerce

WordPress plugin Scheduled Products for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: scheduled-product...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.0.3
  • WordPress version: 6.3.1
  • First release: Jan 14, 2019
  • Latest release: Jan 14, 2019
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: wooelements (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /1,389 total downloads

Benchmarks

Plugin footprint 83% 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: ▼11.33ms] Passed 4 tests

This is a short check of server-side resources used by Scheduled Products for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.43 ▲1.70
Dashboard /wp-admin3.33 ▼0.0240.10 ▼16.98
Posts /wp-admin/edit.php3.38 ▲0.0241.52 ▼2.07
Add New Post /wp-admin/post-new.php5.91 ▲0.0278.09 ▼24.33
Media Library /wp-admin/upload.php3.25 ▲0.0236.17 ▼1.94

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Scheduled Products for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.35 ▼0.021.61 ▲0.0744.75 ▲3.44
Dashboard /wp-admin2,195 ▲145.55 ▼0.1680.06 ▼24.5737.97 ▼5.17
Posts /wp-admin/edit.php2,100 ▼32.03 ▼0.0834.92 ▼3.1530.46 ▼6.09
Add New Post /wp-admin/post-new.php1,528 ▲223.04 ▼0.36702.24 ▲35.0256.35 ▲4.55
Media Library /wp-admin/upload.php1,403 ▲34.18 ▼0.0694.38 ▼15.6042.72 ▼5.10

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention: You can take inspiration from this readme.txt

scheduled-products-for-woocommerce/woo-scheduled-products.php 85% from 13 tests

The main PHP script in "Scheduled Products for WooCommerce" version 1.0.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("scheduled-products-for-woocommerce.php" instead of "woo-scheduled-products.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected395 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP37169314
Sass18034
CSS18231
JavaScript15016

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity20.00
▷ Minimum class complexity3.00
▷ Maximum class complexity47.00
Average method complexity4.17
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1477.78%
▷ Protected methods00.00%
▷ Private methods422.22%
Functions1
▷ Named functions1100.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
4 PNG files occupy 0.14MB with 0.07MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.PNG49.84KB22.74KB▼ 54.37%
assets/screenshot-1.PNG17.22KB8.26KB▼ 52.05%
assets/banner-772x250.png73.34KB23.68KB▼ 67.71%
assets/icon-128x128.png2.81KB2.16KB▼ 23.33%