83% c4d-woo-variation-swatches

Code Review | C4D Woo Variation Images

WordPress plugin C4D Woo Variation Images scored 83% from 54 tests.

About plugin

  • Plugin page: c4d-woo-variation...
  • Plugin version: 1.3.64
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4.1
  • WordPress version: 6.3.1
  • First release: Jul 4, 2018
  • Latest release: Jun 1, 2020
  • Number of updates: 164
  • Update frequency: every 4.3 days
  • Top authors: coffee4dev (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

300+ active / 19,387 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.75ms] Passed 4 tests

An overview of server-side resources used by C4D Woo Variation Images
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.82 ▼1.50
Dashboard /wp-admin3.31 ▲0.0043.77 ▼8.43
Posts /wp-admin/edit.php3.36 ▲0.0040.93 ▼4.64
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.24 ▼8.43
Media Library /wp-admin/upload.php3.23 ▲0.0038.70 ▲3.22

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 46 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for C4D Woo Variation Images
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.36 ▼1.011.70 ▼0.1041.15 ▼4.01
Dashboard /wp-admin2,209 ▲215.92 ▲1.0394.81 ▼19.6239.49 ▼5.13
Posts /wp-admin/edit.php2,089 ▼02.06 ▼0.0632.03 ▼2.8131.71 ▼3.65
Add New Post /wp-admin/post-new.php1,514 ▼2017.58 ▼5.61676.37 ▼6.7373.08 ▲4.67
Media Library /wp-admin/upload.php1,391 ▲34.18 ▼0.13105.91 ▲5.8949.32 ▲6.62

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/c4d-woo-variation-swatches/includes/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/c4d-woo-variation-swatches/includes/tab.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/c4d-woo-variation-swatches/includes/single.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/c4d-woo-variation-swatches/includes/metaboxes.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/c4d-woo-variation-swatches/includes/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/c4d-woo-variation-swatches/includes/loop.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/c4d-woo-variation-swatches/includes/cart.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4 in c4d-woo-variation-swatches/assets to your readme.txt
  • Tags: You are using too many tags: 17 tag instead of maximum 10
The official readme.txt might help

c4d-woo-variation-swatches/c4d-woo-variation-swatches.php 92% from 13 tests

"C4D Woo Variation Images" version 1.3.64'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:
  • 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
Success! There were no dangerous files found in this plugin8,780 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript81,1462994,324
PHP116091,7093,558
CSS74431532
PO File1139163334
SVG21032

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity48.14
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity4.27
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods101
▷ Static methods54.95%
▷ Public methods7877.23%
▷ Protected methods2322.77%
▷ Private methods00.00%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants350.00%
▷ Class constants350.00%
▷ Public constants3100.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.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/flexslider/images/bg_play_pause.png1.51KB0.52KB▼ 65.52%
assets/cursor.png3.04KB2.06KB▼ 32.10%
assets/css/img/zoomIn.png5.37KB2.82KB▼ 47.41%
assets/plus_cursor.png2.36KB1.00KB▼ 57.46%
assets/css/img/close.png20.76KB4.23KB▼ 79.62%