62% superslider-previousnext-thumbs

Code Review | Superslider-PreviousNext-Thumbs

WordPress plugin Superslider-PreviousNext-Thumbs scored 62% from 54 tests.

About plugin

  • Plugin page: superslider-previ...
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-3.3.1
  • WordPress version: 5.8.1
  • First release: Mar 10, 2010
  • Latest release: Dec 22, 2012
  • Number of updates: 14
  • Update frequency: every 73.8 days
  • Top authors: Daiv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,587 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.75MB] [CPU: ▼171.78ms] Passed 4 tests

Analyzing server-side resources used by Superslider-PreviousNext-Thumbs
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.0327.72 ▲1.59
Dashboard /wp-admin2.91 ▼0.1614.97 ▼29.25
Posts /wp-admin/edit.php2.91 ▼0.2016.69 ▼18.75
Add New Post /wp-admin/post-new.php2.91 ▼2.5315.11 ▼630.35
Media Library /wp-admin/upload.php2.91 ▼0.1015.92 ▼8.77
SuperSlider-Pnext /wp-admin/options-general.php?page=superslider-pnext2.9116.75

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 4 new options
New WordPress options
prenext_size_h
prenext_crop
ssPnext_options
prenext_size_w

Browser metrics Passed 4 tests

A check of browser resources used by Superslider-PreviousNext-Thumbs
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,675 ▲7415.65 ▼0.327.31 ▲0.9775.41 ▲2.27
Dashboard /wp-admin2,938 ▲466.10 ▼0.04118.70 ▼14.19173.87 ▼0.02
Posts /wp-admin/edit.php2,745 ▲23.24 ▲0.0061.39 ▼4.98137.44 ▼3.49
Add New Post /wp-admin/post-new.php3,810 ▲11218.62 ▲0.70418.77 ▼11.05165.18 ▼4.29
Media Library /wp-admin/upload.php1,757 ▲115.54 ▲0.10152.03 ▲7.33186.30 ▼2.12
SuperSlider-Pnext /wp-admin/options-general.php?page=superslider-pnext2,6613.2872.70137.93

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/superslider-previousnext-thumbs/superslider-previousnext-thumbs.php+604
    Undefined variable: thumb_w
  • This plugin did not uninstall successfully, leaving 4 options in the database
    • prenext_size_w
    • prenext_crop
    • ssPnext_options
    • prenext_size_h

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=superslider-pnext
    • > Notice in wp-content/plugins/superslider-previousnext-thumbs/superslider-previousnext-thumbs.php+604
    Undefined variable: thumb_w
    • > GET request to /wp-admin/options-general.php?page=superslider-pnext
    • > Notice in wp-content/plugins/superslider-previousnext-thumbs/superslider-previousnext-thumbs.php+605
    Undefined variable: thumb_h
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=superslider-pnext
    • > Notice in wp-content/plugins/superslider-previousnext-thumbs/admin/superslider-pnext-ui.php+691
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/superslider-previousnext-thumbs/admin/superslider-pnext-ui.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/superslider-previousnext-thumbs/superslider-previousnext-thumbs.php:87

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=superslider-pnext
    • > Network (severe)
    wp-content/plugins/superslider-previousnext-thumbs/admin/ss_admin_tool.css?ver=5.8.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=superslider-pnext
    • > Javascript (severe) in unknown
    /wp-content/plugins/superslider-previousnext-thumbs/admin/js/jquery.tooltip.min.js?ver=2 13:62 Uncaught TypeError: Cannot read properties of undefined (reading 'msie')
    • > GET request to /wp-admin/options-general.php?page=superslider-pnext
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core&ver=5.8.1 1:31592 "jQuery.Deferred exception: $(...).tooltip is not a function" "TypeError: $(...).tooltip is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/superslider-previousnext-thumbs/admin/js/superslider-admin-tool.js?ver=2:5:19)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core&ver=5.8.1:2:30340)" undefined
    • > GET request to /wp-admin/options-general.php?page=superslider-pnext
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core&ver=5.8.1 1:31702 Uncaught TypeError: $(...).tooltip is not a function

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (![SlideShow-Pnext options screen](screenshot-1.png "SlideShow-Pnext options screen")), #2 (![SuperSlider-Pnext in action](screenshot-2.png "SuperSlider-Pnext in action")), #3 (![SuperSlider-Pnext in action](screenshot-3.png "SuperSlider-Pnext in action")), #4 (![SuperSlider-Pnext in action](screenshot-4.png "SuperSlider-Pnext in action"))
The official readme.txt is a good inspiration

superslider-previousnext-thumbs/superslider-previousnext-thumbs.php Passed 13 tests

The entry point to "Superslider-PreviousNext-Thumbs" version 2.1 is a PHP file that has certain tags in its header comment area
128 characters long description:
A previous-next post, thumbnail navigation creator. Works specifically on the single post pages. Uses Mootools 1.4.5 javascript.

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
Success! There were no dangerous files found in this plugin2,976 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript6491251,231
PHP22071021,016
CSS56838532
PO File17476197

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity88.00
▷ Minimum class complexity88.00
▷ Maximum class complexity88.00
Average method complexity3.90
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods30
▷ Static methods00.00%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.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
15 PNG files occupy 0.31MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/default.png1.45KB0.92KB▼ 36.82%
admin/img/black.png1.29KB0.67KB▼ 47.64%
screenshot-3.png51.17KB16.37KB▼ 68.02%
plugin-data/superslider/ssPnext/pre-next-arrow-edit.png27.77KB0.95KB▼ 96.57%
admin/img/blue.png1.19KB0.62KB▼ 48.15%