84% tools-for-color-variations

Code Review | Tools for color variations.

WordPress plugin Tools for color variations. scored84%from 54 tests.

About plugin

  • Plugin page: tools-for-color-v...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.1-5.8
  • WordPress version: 6.3.1
  • First release: Nov 30, 2021
  • Latest release: Nov 30, 2021
  • Number of updates: 6
  • Update frequency: every 57.3 days
  • Top authors: webria (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /264 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▼4.56ms] Passed 4 tests

An overview of server-side resources used by Tools for color variations.
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1343.43 ▼1.99
Dashboard /wp-admin3.43 ▲0.0854.06 ▼18.12
Posts /wp-admin/edit.php3.54 ▲0.1858.45 ▲1.97
Add New Post /wp-admin/post-new.php6.03 ▲0.14101.58 ▲0.47
Media Library /wp-admin/upload.php3.35 ▲0.1241.43 ▲1.41

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Tools for color variations.
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,879 ▲11813.42 ▼0.968.10 ▲6.1043.83 ▲2.31
Dashboard /wp-admin2,202 ▲255.57 ▼0.0392.23 ▼12.7239.21 ▼6.19
Posts /wp-admin/edit.php2,107 ▲72.00 ▲0.0340.67 ▲2.1237.24 ▲2.23
Add New Post /wp-admin/post-new.php1,533 ▲523.39 ▲0.15714.65 ▲34.7058.07 ▲2.60
Media Library /wp-admin/upload.php1,407 ▲104.18 ▼0.01100.30 ▼10.5645.14 ▼3.16

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/tools-for-color-variations/public/partials/variantspictures-public-display.php
    • > /wp-content/plugins/tools-for-color-variations/admin/partials/variantspictures-admin-display.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: variations colorize, woocommerce variable, colorize, color product, woocommerce...

tools-for-color-variations/variantspictures.php 85% from 13 tests

This is the main PHP file of "Tools for color variations." version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("tools-for-color-variations.php" instead of "variantspictures.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin1,079 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12160517595
JavaScript2311212
CSS2918191
PO File1242581

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.14
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions13
▷ Named functions1292.31%
▷ Anonymous functions17.69%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin