83% jetpack-slideshow-caption

Code Review | Slideshow Captions for Jetpack

WordPress plugin Slideshow Captions for Jetpack scored83%from 54 tests.

About plugin

  • Plugin page: jetpack-slideshow...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Jun 26, 2013
  • Latest release: Feb 25, 2023
  • Number of updates: 14
  • Update frequency: every 252.2 days
  • Top authors: tw2113 (71.43%)jtsternberg (35.71%)

Code review

54 tests

User reviews

3 reviews

Install metrics

80+ active /4,354 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.00MB] [CPU: ▼3.21ms] Passed 4 tests

Server-side resources used by Slideshow Captions for Jetpack
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.00 ▼1.83
Dashboard /wp-admin3.31 ▲0.0047.66 ▼2.04
Posts /wp-admin/edit.php3.36 ▲0.0048.27 ▲2.35
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.30 ▼9.49
Media Library /wp-admin/upload.php3.23 ▲0.0032.73 ▲0.54

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Slideshow Captions for Jetpack
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.69 ▼0.685.27 ▲3.2546.78 ▼2.51
Dashboard /wp-admin2,209 ▲215.88 ▼0.03108.17 ▼1.7541.42 ▼2.85
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0240.25 ▼0.0936.29 ▲2.53
Add New Post /wp-admin/post-new.php1,519 ▼023.31 ▲0.17675.39 ▲2.3258.56 ▼1.61
Media Library /wp-admin/upload.php1,388 ▼34.18 ▲0.0395.73 ▼8.0040.49 ▼2.67

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jetpack-slideshow-caption/jetpack-slideshow-caption.php:51

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Caption is displayed below the photo.)
  • Plugin Name: You should set the name of your plugin on the first line ( === Slideshow Captions for Jetpack === )
The official readme.txt is a good inspiration

jetpack-slideshow-caption/jetpack-slideshow-caption.php Passed 13 tests

Analyzing the main PHP file in "Slideshow Captions for Jetpack" version 1.1.0
53 characters long description:
Modifies Jetpack's default slideshow caption feature.

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
Good job! No executable or dangerous file extensions detected338 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript12910195
CSS1153115
PHP171628

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.52MB with 0.11MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/slideshow-controls.png0.99KB1.21KB0.00%
screenshot-1.png530.81KB194.33KB▼ 63.39%
img/slideshow-controls-2x.png1.90KB2.37KB0.00%