84% wunderslider-gallery

Code Review | WunderSlider Gallery

WordPress plugin WunderSlider Gallery scored84%from 54 tests.

About plugin

  • Plugin page: wunderslider-gallery
  • Plugin version: 1.3.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.8
  • WordPress version: 6.3.1
  • First release: Jul 10, 2012
  • Latest release: Dec 13, 2013
  • Number of updates: 51
  • Update frequency: every 10.2 days
  • Top authors: itthinx (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /32,169 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.64ms] Passed 4 tests

This is a short check of server-side resources used by WunderSlider Gallery
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0842.93 ▼0.44
Dashboard /wp-admin3.33 ▼0.0252.26 ▼13.44
Posts /wp-admin/edit.php3.38 ▲0.0251.65 ▼4.80
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.21 ▼15.87
Media Library /wp-admin/upload.php3.26 ▲0.0244.91 ▲7.96
WunderSlider Gallery /wp-admin/themes.php?page=wunderslider-gallery3.3736.55

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WunderSlider Gallery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.28 ▼0.151.86 ▼0.1242.50 ▼1.42
Dashboard /wp-admin2,196 ▲165.54 ▼0.1782.76 ▼24.9837.97 ▼16.71
Posts /wp-admin/edit.php2,104 ▲71.99 ▲0.0436.41 ▼1.9034.65 ▲4.19
Add New Post /wp-admin/post-new.php1,529 ▼623.51 ▲5.00630.25 ▼4.3553.06 ▼21.89
Media Library /wp-admin/upload.php1,407 ▲44.16 ▼0.0699.10 ▲1.2944.16 ▲0.70
WunderSlider Gallery /wp-admin/themes.php?page=wunderslider-gallery1,7252.0426.7835.19

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Please fix the following items
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wunderslider-gallery/lib/core/boot.php:22
    • > PHP Warning
      require_once(WSG_UTY_LIB/class-wsg-utility.php): failed to open stream: No such file or directory in wp-content/plugins/wunderslider-gallery/lib/admin/admin-options-set.php on line 29
    • > PHP Fatal error
      require_once(): Failed opening required 'WSG_UTY_LIB/class-wsg-utility.php' (include_path='.:/usr/share/php') in wp-content/plugins/wunderslider-gallery/lib/admin/admin-options-set.php on line 29
    • > PHP Warning
      Use of undefined constant WSG_UTY_LIB - assumed 'WSG_UTY_LIB' (this will throw an Error in a future version of PHP) in wp-content/plugins/wunderslider-gallery/lib/admin/admin-options-set.php on line 29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wunderslider-gallery/lib/core/class-wunderslider-gallery.php:298
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wunderslider-gallery/wunderslider-gallery.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wunderslider-gallery/lib/admin/admin-options-form.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wunderslider-gallery/lib/core/class-wunderslider-nggallery.php:298
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wunderslider-gallery/lib/admin/class-wsg-admin-options.php:96

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 34 tag instead of maximum 10
Please take inspiration from this readme.txt

wunderslider-gallery/wunderslider-gallery.php 92% from 13 tests

The main PHP script in "WunderSlider Gallery" version 1.3.9 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 257 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,405 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP81563711,131
PO File17489219
CSS131955

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity34.00
▷ Minimum class complexity2.00
▷ Maximum class complexity57.00
Average method complexity6.74
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods23
▷ Static methods23100.00%
▷ Public methods2295.65%
▷ Protected methods00.00%
▷ Private methods14.35%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/wunderslider-gallery-160x100.png9.00KB4.21KB▼ 53.19%