78% gwl-variation-gallery

Code Review | GWL Variation Gallery

WordPress plugin GWL Variation Gallery scored 78% from 54 tests.

About plugin

  • Plugin page: gwl-variation-gal...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 23, 2022
  • Latest release: Dec 23, 2022
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: galaxyweblinks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 154 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
Install script ran successfully

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

This is a short check of server-side resources used by GWL Variation Gallery
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.43 ▲0.73
Dashboard /wp-admin3.32 ▲0.0243.91 ▼8.83
Posts /wp-admin/edit.php3.37 ▲0.0244.31 ▼4.49
Add New Post /wp-admin/post-new.php5.92 ▲0.0492.69 ▲12.85
Media Library /wp-admin/upload.php3.24 ▲0.0233.95 ▼2.76

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for GWL Variation Gallery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,894 ▲10513.98 ▲0.748.86 ▲7.1641.47 ▼4.22
Dashboard /wp-admin2,213 ▲75.85 ▲1.0096.36 ▼22.3439.25 ▼3.12
Posts /wp-admin/edit.php2,099 ▲102.05 ▲0.0339.48 ▲4.3539.92 ▲5.22
Add New Post /wp-admin/post-new.php1,524 ▼1021.40 ▼1.77663.70 ▼9.4251.55 ▲1.94
Media Library /wp-admin/upload.php1,398 ▲164.28 ▲0.0996.27 ▼0.2341.61 ▼2.28

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% 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
Almost there! Just fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/gwl-variation-gallery/public/partials/gwl-variation-gallery-public-display.php
    • > /wp-content/plugins/gwl-variation-gallery/admin/partials/gwl-variation-gallery-template.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/gwl-variation-gallery/admin/partials/gwl-variation-gallery-admin-display.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Backend), #2 (Full Product), #3 (Gray Variation), #4 (Green Variation)
The official readme.txt might help

gwl-variation-gallery/gwl-variation-gallery.php Passed 13 tests

This is the main PHP file of "GWL Variation Gallery" 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
93 characters long description:
Add gallery images for variable product. You can add different images on different variation.

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
Good job! No executable or dangerous file extensions detected496 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP12123466303
JavaScript4325173
CSS21420

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.77
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods2076.92%
▷ Protected methods00.00%
▷ Private methods623.08%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.34MB with 0.24MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshots/FullProduct.png86.91KB27.70KB▼ 68.13%
screenshots/GrayVariation.png88.43KB28.11KB▼ 68.21%
screenshots/GreenVarition.png90.85KB28.43KB▼ 68.71%
screenshots/Backend.png86.66KB24.97KB▼ 71.19%