88% thumbnail-slider

Code Review | Thumbnail Slider

WordPress plugin Thumbnail Slider scored 88% from 54 tests.

About plugin

  • Plugin page: thumbnail-slider
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.0
  • WordPress version: 5.8.1
  • First release: Sep 29, 2016
  • Latest release: Oct 26, 2016
  • Number of updates: 12
  • Update frequency: every 2.3 days
  • Top authors: kuldip_raghu (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,544 total downloads

Benchmarks

Plugin footprint Passed 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.27MB] [CPU: ▼154.42ms] Passed 4 tests

Server-side resources used by Thumbnail Slider
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.1942.43 ▲18.99
Dashboard /wp-admin3.14 ▲0.0849.91 ▼2.88
Posts /wp-admin/edit.php3.19 ▲0.0850.95 ▼0.52
Add New Post /wp-admin/post-new.php4.12 ▼1.3153.29 ▼617.69
Media Library /wp-admin/upload.php3.08 ▲0.0838.68 ▲3.42
All Banner /wp-admin/edit.php?post_type=banners3.1238.87
Add New /wp-admin/post-new.php?post_type=banners3.0134.91

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Thumbnail Slider
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,768 ▲17215.94 ▲0.3613.54 ▲0.0154.80 ▼1.11
Dashboard /wp-admin3,014 ▲836.01 ▲0.09152.78 ▼9.23103.59 ▼19.30
Posts /wp-admin/edit.php2,783 ▲472.72 ▲0.0068.35 ▼3.63101.03 ▲1.51
Add New Post /wp-admin/post-new.php1,645 ▼3821.38 ▲3.61290.78 ▼158.19117.02 ▼1.43
Media Library /wp-admin/upload.php1,851 ▲445.00 ▼0.04169.59 ▲10.36106.55 ▼12.79
All Banner /wp-admin/edit.php?post_type=banners1,4502.6362.3373.14
Add New /wp-admin/post-new.php?post_type=banners2,9788.93252.58152.77
Slider Settings /wp-admin/thumbnail-slider.php260.900.0913.55

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/post-new.php?post_type=banners
    • > Notice in wp-content/plugins/thumbnail-slider/thumbnail-slider.php+389
    Undefined index: ts_slider_noncename_so_1444
    • > GET request to /wp-admin/post-new.php?post_type=banners
    • > Notice in wp-content/plugins/thumbnail-slider/thumbnail-slider.php+390
    Undefined index: post_type
    • > GET request to /wp-admin/post-new.php?post_type=banners
    • > Notice in wp-content/plugins/thumbnail-slider/thumbnail-slider.php+391
    Undefined index: image_url
    • > GET request to /wp-admin/post-new.php?post_type=banners
    • > Notice in wp-content/plugins/thumbnail-slider/thumbnail-slider.php+392
    Undefined index: image_desc
    • > GET request to /wp-admin/post-new.php?post_type=banners
    • > Warning in wp-content/plugins/thumbnail-slider/thumbnail-slider.php+361
    Illegal string offset 'image_url'
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=banners
    • > Notice in wp-content/plugins/thumbnail-slider/thumbnail-slider.php+370
    Uninitialized string offset: 0
    • > GET request to /wp-admin/post-new.php?post_type=banners
    • > Warning in wp-content/plugins/thumbnail-slider/thumbnail-slider.php+370
    Illegal string offset 'image_desc'

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
No output text or server-side errors detected on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/thumbnail-slider.php
    • > Network (severe)
    wp-admin/thumbnail-slider.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === thumbnail-slider === )
You can look at the official readme.txt

thumbnail-slider/thumbnail-slider.php 92% from 13 tests

The main PHP file in "Thumbnail Slider" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 369 characters long)

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
Success! There were no dangerous files found in this plugin1,348 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP2837472
CSS47624455
JavaScript388110421

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/icon.png1.45KB0.73KB▼ 49.63%