84% woo-custom-sale-tag

Code Review | Woocommerce Custom Sale Tag

WordPress plugin Woocommerce Custom Sale Tag scored84%from 54 tests.

About plugin

  • Plugin page: woo-custom-sale-tag
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2
  • WordPress version: 6.3.1
  • First release: Jul 17, 2015
  • Latest release: Jul 17, 2015
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: jamiechong (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

600+ active /8,597 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

An overview of server-side resources used by Woocommerce Custom Sale Tag
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.65 ▲2.48
Dashboard /wp-admin3.32 ▲0.0254.95 ▲6.75
Posts /wp-admin/edit.php3.38 ▲0.0244.69 ▼0.80
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.12 ▼10.37
Media Library /wp-admin/upload.php3.25 ▲0.0235.15 ▲1.55

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Woocommerce Custom Sale Tag
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.32 ▼0.042.13 ▲0.5146.16 ▲1.30
Dashboard /wp-admin2,195 ▲155.58 ▼0.0285.76 ▼6.0037.04 ▼4.99
Posts /wp-admin/edit.php2,100 ▼42.03 ▼0.0033.98 ▼4.0334.34 ▼3.23
Add New Post /wp-admin/post-new.php1,526 ▼023.15 ▼0.37646.10 ▼51.6153.22 ▼7.19
Media Library /wp-admin/upload.php1,397 ▼34.18 ▲0.0395.31 ▼18.8043.75 ▼2.78

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-custom-sale-tag/index.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
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
5 plugin tags: woocommerce, label, tag, sale, custom

woo-custom-sale-tag/index.php 92% from 13 tests

The main PHP file in "Woocommerce Custom Sale Tag" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-custom-sale-tag.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin75 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1232475

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin