83% html5-slideshow-presentations

Code Review | HTML5 Slideshow Presentations

WordPress plugin HTML5 Slideshow Presentationsscored 83% from 54 tests.

About plugin

  • Plugin page: html5-slideshow-p...
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.6
  • WordPress version: 5.8.1
  • First release: Jan 12, 2012
  • Latest release: Sep 27, 2013
  • Number of updates: 57
  • Update frequency: every 11.0 days
  • Top authors: jtsternberg (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active / 20,931 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼157.31ms] Passed 4 tests

Analyzing server-side resources used by HTML5 Slideshow Presentations
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.94 ▲0.2243.50 ▲13.96
Dashboard /wp-admin3.00 ▼0.0635.32 ▼26.45
Posts /wp-admin/edit.php3.26 ▲0.1462.16 ▼13.56
Add New Post /wp-admin/post-new.php5.54 ▲0.10113.84 ▼598.24
Media Library /wp-admin/upload.php3.12 ▲0.1149.23 ▲9.01
HTML5 Presentations /wp-admin/options-general.php?page=html5presentation-settings3.0937.66
Add New /wp-admin/post-new.php?post_type=html5presentation3.2261.47
HTML5 Presentations /wp-admin/edit.php?post_type=html5presentation3.1644.76

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 1 new option
New WordPress options
include-wp_footer

Browser metrics Passed 4 tests

This is an overview of browser requirements for HTML5 Slideshow Presentations
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,738 ▲12516.20 ▲0.657.93 ▼7.2557.16 ▼3.00
Dashboard /wp-admin3,003 ▲726.06 ▼0.03203.19 ▲6.12142.03 ▲3.57
Posts /wp-admin/edit.php2,784 ▲452.70 ▲0.00114.12 ▲18.69104.72 ▼174.34
Add New Post /wp-admin/post-new.php1,714 ▲4415.73 ▲1.00490.63 ▼18.78128.19 ▼7.43
Media Library /wp-admin/upload.php1,852 ▲455.05 ▲0.03185.65 ▼17.68137.24 ▲1.60
HTML5 Presentations /wp-admin/options-general.php?page=html5presentation-settings1,1652.2168.0896.53
Add New /wp-admin/post-new.php?post_type=html5presentation3,0669.05552.88284.63
HTML5 Presentations /wp-admin/edit.php?post_type=html5presentation1,4852.6383.6989.26

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 1 option
    • include-wp_footer

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/html5-slideshow-presentations/html5presentation-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/html5-slideshow-presentations/html5-presentation-template.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/html5-slideshow-presentations/html5_slideshow_presentation.php:13

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)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Sample slide.), #2 (Title slide edit screen.), #3 (Slide Management.), #4 (Plugin Options.), #5 (Create a WordPress Page, and choose your presentation.)
  • Plugin Name: You should set the name of your plugin on the first line ( === HTML5 Slideshow Presentations=== )
You can look at the official readme.txt

html5-slideshow-presentations/html5_slideshow_presentation.php 92% from 13 tests

The principal PHP file in "HTML5 Slideshow Presentations" v. 1.0.7 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("html5-slideshow-presentations.php" instead of "html5_slideshow_presentation.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected2,875 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript22024471,354
PHP418037904
CSS214037617

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
11 PNG files occupy 0.24MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/wordpress-logo-small.png4.07KB3.74KB▼ 8.21%
images/html5-icon.png1.58KB1.44KB▼ 8.48%
images/example-graph.png26.33KB15.77KB▼ 40.08%
images/zigzag.png0.15KB0.15KB0.00%
images/wordpress-pie-chart.png34.18KB12.59KB▼ 63.16%