83% woo-on-sale-information

Code Review | WooCommerce On Sale Information

WordPress plugin WooCommerce On Sale Information scored83%from 54 tests.

About plugin

  • Plugin page: woo-on-sale-infor...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1+
  • WordPress version: 6.3.1
  • First release: Sep 28, 2018
  • Latest release: Aug 10, 2019
  • Number of updates: 8
  • Update frequency: every 39.5 days
  • Top authors: apintocr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,275 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.72ms] Passed 4 tests

An overview of server-side resources used by WooCommerce On Sale Information
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.76 ▲0.06
Dashboard /wp-admin3.32 ▲0.0250.25 ▼2.30
Posts /wp-admin/edit.php3.37 ▲0.0247.72 ▼0.87
Add New Post /wp-admin/post-new.php5.90 ▲0.0284.50 ▼19.75
Media Library /wp-admin/upload.php3.24 ▲0.0239.22 ▲1.35

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce On Sale Information
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.24 ▼1.382.01 ▲0.3142.59 ▲0.93
Dashboard /wp-admin2,206 ▲154.86 ▼0.96105.18 ▲2.4340.59 ▼11.55
Posts /wp-admin/edit.php2,089 ▲32.00 ▲0.0138.26 ▲1.6633.33 ▼1.30
Add New Post /wp-admin/post-new.php1,514 ▼017.65 ▲0.15663.81 ▲12.2252.34 ▼3.77
Media Library /wp-admin/upload.php1,385 ▼34.18 ▼0.04105.33 ▲2.3849.96 ▲3.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

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
Even though everything seems fine, this is not 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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function VGY\\WcOnSaleInformation\\add_action() in wp-content/plugins/woo-on-sale-information/woocommerce-onsale-information.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tested up to: The plugin version is formatted incorrectly
Please take inspiration from this readme.txt

woo-on-sale-information/woocommerce-onsale-information.php 77% from 13 tests

Analyzing the main PHP file in "WooCommerce On Sale Information" version 1.1.2
Please make the necessary changes and fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.9" instead of "3.1")
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-on-sale-information.php" instead of "woocommerce-onsale-information.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 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin97 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
Markdown119049
PHP2215548

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
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
Namespaces1
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected