78% wooswipe

Code Review | WooSwipe WooCommerce Gallery

WordPress plugin WooSwipe WooCommerce Gallery scored78%from 54 tests.

About plugin

  • Plugin page: wooswipe
  • Plugin version: 3.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Dec 15, 2015
  • Latest release: Nov 9, 2023
  • Number of updates: 18
  • Update frequency: every 18.1 days
  • Top authors: deanoakley (100%)

Code review

54 tests

User reviews

40 reviews

Install metrics

6,000+ active /136,054 total downloads

Benchmarks

Plugin footprint 83% from 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.10MB] [CPU: ▼8.44ms] Passed 4 tests

A check of server-side resources used by WooSwipe WooCommerce Gallery
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1137.36 ▼6.23
Dashboard /wp-admin3.41 ▲0.0645.49 ▼14.80
Posts /wp-admin/edit.php3.52 ▲0.1646.95 ▼1.11
Add New Post /wp-admin/post-new.php6.01 ▲0.1290.01 ▼11.62
Media Library /wp-admin/upload.php3.33 ▲0.1035.75 ▼0.52
WooSwipe /wp-admin/admin.php?page=wooswipe-options3.3530.49

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 54 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
wooswipe_options
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WooSwipe WooCommerce Gallery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,894 ▲13213.37 ▼0.778.32 ▲6.5743.44 ▼0.54
Dashboard /wp-admin2,202 ▲225.63 ▼0.0293.93 ▲1.4739.44 ▼3.19
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0741.08 ▲2.9335.11 ▲2.18
Add New Post /wp-admin/post-new.php1,530 ▲423.51 ▲0.07670.97 ▼19.5945.91 ▼7.44
Media Library /wp-admin/upload.php1,401 ▲44.21 ▲0.0699.42 ▼5.3440.05 ▼1.75
WooSwipe /wp-admin/admin.php?page=wooswipe-options9272.0122.5130.00

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • wooswipe_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wooswipe/public/partials/inc-photoswipe-footer.php
    • > /wp-content/plugins/wooswipe/public/partials/wooswipe-main_image_swiper.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/wooswipe/public/partials/wooswipe-main_image_swiper.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wooswipe/admin/partials/wooswipe-admin-display.php:14
    • > PHP Notice
      Undefined variable: finalArray in wp-content/plugins/wooswipe/public/partials/wooswipe-main_image_swiper.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wooswipe/public/partials/wooswipe-public-display.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Screenshot Default gallery layout), #2 (Screenshot Popup layout)
The official readme.txt might help

wooswipe/wooswipe.php 92% from 13 tests

"WooSwipe WooCommerce Gallery" version 3.0.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 200 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin8,182 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript101,8455215,943
CSS82871611,481
PHP14199596689
SVG51161
Ruby1208

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.32
Average class complexity4.86
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods38
▷ Static methods25.26%
▷ Public methods3386.84%
▷ Protected methods00.00%
▷ Private methods513.16%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/pswp/white-skin/skin.png15.02KB0.72KB▼ 95.22%
public/pswp/default-skin/default-skin.png0.53KB0.72KB0.00%