89% composite-products-conditional-images-for-woocommerce

Code Review | Composite Products - Conditional Images

WordPress plugin Composite Products - Conditional Images scored89%from 54 tests.

About plugin

  • Plugin page: composite-product...
  • Plugin version: 1.3.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Feb 13, 2020
  • Latest release: Aug 17, 2023
  • Number of updates: 15
  • Update frequency: every 85.4 days
  • Top authors: franticpsyx (66.67%)jasonkytros (26.67%)SomewhereWarm (20%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /4,495 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

A check of server-side resources used by Composite Products - Conditional Images
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0542.22 ▲3.91
Dashboard /wp-admin3.36 ▲0.0150.34 ▼11.60
Posts /wp-admin/edit.php3.41 ▲0.0550.26 ▲0.07
Add New Post /wp-admin/post-new.php5.94 ▲0.0585.92 ▼7.87
Media Library /wp-admin/upload.php3.28 ▲0.0537.96 ▲1.34

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

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

Browser metrics Passed 4 tests

Composite Products - Conditional Images: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.57 ▼0.864.70 ▲2.7441.53 ▼3.40
Dashboard /wp-admin2,218 ▲305.77 ▲0.84101.46 ▼11.9242.13 ▲1.21
Posts /wp-admin/edit.php2,100 ▲82.00 ▼0.0137.84 ▼2.8835.85 ▲0.17
Add New Post /wp-admin/post-new.php1,526 ▼223.47 ▲5.13630.66 ▼19.3058.67 ▲6.11
Media Library /wp-admin/upload.php1,391 ▲64.25 ▲0.0895.21 ▼9.5044.25 ▼4.45

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: conditional, composite, woocommerce, image, products...

composite-products-conditional-images-for-woocommerce/composite-products-conditional-images-for-woocommerce.php 85% from 13 tests

The entry point to "Composite Products - Conditional Images" version 1.3.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: The description should be shorter than 140 characters (currently 158 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin385 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP167126186
JavaScript47626157
CSS212242

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity47.00
▷ Minimum class complexity47.00
▷ Maximum class complexity47.00
Average method complexity4.29
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods14100.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
No PNG files were detected