88% woolense

Code Review | Woolense - Similar Color Products for WooCommerce

WordPress plugin Woolense - Similar Color Products for WooCommerce scored 88% from 54 tests.

About plugin

  • Plugin page: woolense
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-5.3
  • WordPress version: 5.9.2
  • First release: Nov 13, 2019
  • Latest release: Nov 21, 2019
  • Number of updates: 11
  • Update frequency: every 0.8 days
  • Top authors: mehbubrashid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 279 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Server-side resources used by Woolense - Similar Color Products for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0155.45 ▲0.16
Dashboard /wp-admin3.41 ▲0.0034.25 ▼21.31
Posts /wp-admin/edit.php3.64 ▲0.0042.21 ▼8.01
Add New Post /wp-admin/post-new.php6.88 ▼0.0990.35 ▼1,218.41
Media Library /wp-admin/upload.php3.29 ▲0.0025.61 ▲1.25

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 48 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Woolense - Similar Color Products for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,808 ▲6216.01 ▲1.325.74 ▼1.372.98 ▲0.88
Dashboard /wp-admin2,902 ▲456.09 ▲0.01132.52 ▲0.77174.17 ▲7.06
Posts /wp-admin/edit.php2,691 ▼03.23 ▼0.1363.81 ▼29.12143.19 ▼1.47
Add New Post /wp-admin/post-new.php1,661 ▼3516.15 ▼5.65401.91 ▼78.27214.96 ▲56.20
Media Library /wp-admin/upload.php1,695 ▼35.52 ▲0.01170.30 ▲31.12247.45 ▲48.64

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 50% 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 0% 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
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/woolense/public/partials/woolense-public-display.php
    • > /wp-content/plugins/woolense/admin/partials/woolense-admin-display.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'ColorThief\\Image\\Adapter\\ImageAdapter' not found in wp-content/plugins/woolense/admin/vendor/ksubileau/color-thief-php/lib/ColorThief/Image/Adapter/ImagickImageAdapter.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ColorThief\\Image\\Adapter\\ImageAdapter' not found in wp-content/plugins/woolense/admin/vendor/ksubileau/color-thief-php/lib/ColorThief/Image/Adapter/GDImageAdapter.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'ColorThief\\Image\\Adapter\\IImageAdapter' not found in wp-content/plugins/woolense/admin/vendor/ksubileau/color-thief-php/lib/ColorThief/Image/Adapter/ImageAdapter.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'ColorThief\\Image\\Adapter\\ImageAdapter' not found in wp-content/plugins/woolense/admin/vendor/ksubileau/color-thief-php/lib/ColorThief/Image/Adapter/GmagickImageAdapter.php:7

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

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
  • Screenshots: Please describe screenshot #2 in woolense/assets to your readme.txt
You can look at the official readme.txt

woolense/woolense.php 92% from 13 tests

The main PHP script in "Woolense - Similar Color Products for WooCommerce" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.0.1" instead of "2.2")

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
Success! There were no dangerous files found in this plugin2,229 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP304601,1341,688
CSS37525379
JSON35093
JavaScript2276169

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity12.05
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces1
Traits0
Classes21
▷ Abstract classes14.76%
▷ Concrete classes2095.24%
▷ Final classes00.00%
Methods148
▷ Static methods1812.16%
▷ Public methods13389.86%
▷ Protected methods00.00%
▷ Private methods1510.14%
Functions12
▷ Named functions650.00%
▷ Anonymous functions650.00%
Constants7
▷ Global constants114.29%
▷ Class constants685.71%
▷ Public constants6100.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
PNG images were not found in this plugin