67% html5-slideshow

Code Review | html5-slideshow

WordPress plugin html5-slideshow scored 67% from 54 tests.

About plugin

  • Plugin page: html5-slideshow
  • Plugin version: 3.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0.0-1.0.0
  • WordPress version: 6.3.1
  • First release: Jan 9, 2016
  • Latest release: Apr 19, 2016
  • Number of updates: 16
  • Update frequency: every 6.3 days
  • Top authors: miqo1996 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,442 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.39ms] Passed 4 tests

Analyzing server-side resources used by html5-slideshow
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.28 ▼5.45
Dashboard /wp-admin3.31 ▲0.0043.71 ▼10.44
Posts /wp-admin/edit.php3.36 ▲0.0045.99 ▼4.14
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.13 ▼5.53
Media Library /wp-admin/upload.php3.23 ▲0.0034.69 ▲0.42

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by html5-slideshow
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.11 ▼1.251.94 ▲0.2443.83 ▲6.86
Dashboard /wp-admin2,206 ▲175.90 ▲0.92104.90 ▼17.1739.52 ▼2.16
Posts /wp-admin/edit.php2,086 ▼32.05 ▲0.0335.25 ▼1.9433.05 ▲3.35
Add New Post /wp-admin/post-new.php1,535 ▲1523.16 ▼0.14603.81 ▼16.7973.59 ▲10.32
Media Library /wp-admin/upload.php1,391 ▼04.23 ▼0.0298.00 ▼0.0041.50 ▼0.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstaller has failed for this plugin, leaving 15 files (1.00MB) in the plugin directory
    • (new file) img/photos/4.jpg
    • (new file) img/arrows.png
    • (new file) img/bg.jpg
    • (new file) classes/ht5_list_table.php
    • (new file) index.php
    • (new file) html5-slideshow.html
    • (new file) img/photos/2.jpg
    • (new file) img/photos/3.jpg
    • (new file) readme.txt
    • (new file) img/photos/1.jpg
    • ...
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 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
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/html5-slideshow/index.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/html5-slideshow/classes/ht5_list_table.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/html5-slideshow/classes/ht5_list_table.php on line 5
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/html5-slideshow/classes/ht5_list_table.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 87% 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
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #1 (Show all images of slider.), #2 (Add new image), #3 (Demo version)
The official readme.txt is a good inspiration

html5-slideshow/index.php 85% from 13 tests

"html5-slideshow" version 3.1.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("html5-slideshow.php" instead of "index.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 185 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 plugin637 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP25329391
CSS13010133
JavaScript1462889
HTML19024

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods1578.95%
▷ Protected methods421.05%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.72MB with 0.49MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/arrows.png7.35KB3.35KB▼ 54.44%
screenshot-1.png74.82KB22.20KB▼ 70.33%
screenshot-2.png220.56KB61.52KB▼ 72.11%
screenshot-3.png430.96KB109.88KB▼ 74.50%