83% woocommerce-product-css-tags

Code Review | WooCommerce Product CSS3 Tags

WordPress plugin WooCommerce Product CSS3 Tags scored83%from 54 tests.

About plugin

  • Plugin page: woocommerce-produ...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.6.1
  • WordPress version: 6.3.1
  • First release: Dec 13, 2012
  • Latest release: Nov 14, 2016
  • Number of updates: 11
  • Update frequency: every 130.3 days
  • Top authors: terrytsang (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

80+ active /6,770 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼9.40ms] Passed 4 tests

A check of server-side resources used by WooCommerce Product CSS3 Tags
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.48 ▲1.16
Dashboard /wp-admin3.35 ▲0.0147.10 ▼10.83
Posts /wp-admin/edit.php3.40 ▲0.0542.84 ▼3.42
Add New Post /wp-admin/post-new.php5.93 ▲0.0580.31 ▼24.49
Media Library /wp-admin/upload.php3.27 ▲0.0537.51 ▲4.91

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Product CSS3 Tags
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.72 ▼0.671.87 ▲0.1542.54 ▲2.70
Dashboard /wp-admin2,206 ▲185.84 ▼0.0995.75 ▼3.5738.66 ▼4.40
Posts /wp-admin/edit.php2,086 ▼62.05 ▲0.0136.05 ▼4.3330.75 ▼5.67
Add New Post /wp-admin/post-new.php1,514 ▼2817.51 ▼0.46598.45 ▼28.6953.28 ▲0.95
Media Library /wp-admin/upload.php1,388 ▼34.22 ▲0.0693.29 ▼10.1544.91 ▲1.41

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at 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 apply_filters() in wp-content/plugins/woocommerce-product-css-tags/wc-product-css3-tags.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Screenshot Admin WooCommerce Sidebar Tab - Product CSS3 Tags , Use label 'Model' as SKU field), #2 (Screenshot Frontend Product Page - Default Color Scheme for Product Tags), #3 (Screenshot Frontend Product Page - Silver Color for Product Tags and use Stitched Effect)
  • Plugin Name: You should set the name of your plugin on the first line ( === woocommerce-product-css-tags === )
You can take inspiration from this readme.txt

woocommerce-product-css-tags/wc-product-css3-tags.php 92% from 13 tests

The main PHP script in "WooCommerce Product CSS3 Tags" version 1.0.4 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woocommerce-product-css-tags.php" instead of "wc-product-css3-tags.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin416 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP18561291
CSS1138120
JavaScript1005

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity5.12
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
6 PNG files occupy 0.29MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/css3-tag.png2.33KB1.27KB▼ 45.41%
screenshot-3.png127.15KB31.41KB▼ 75.29%
screenshot-2.png123.95KB30.78KB▼ 75.17%
screenshot-1.png34.90KB15.58KB▼ 55.36%
images/get-more-extensions.png3.48KB1.84KB▼ 47.02%