74% rokgallery-background-slideshow

Code Review | RokGallery Background Slideshow

WordPress plugin RokGallery Background Slideshow scored74%from 54 tests.

About plugin

  • Plugin page: rokgallery-backgr...
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.6
  • WordPress version: 6.3.1
  • First release: May 6, 2013
  • Latest release: May 11, 2013
  • Number of updates: 9
  • Update frequency: every 0.6 days
  • Top authors: shazdeh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,422 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼18.11MB] [CPU: ▼3,395,328.05ms] Passed 4 tests

A check of server-side resources used by RokGallery Background Slideshow
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.34 ▼1.1710.71 ▼34.41
Dashboard /wp-admin2.35 ▼66.6511.92 ▼13,581,144.25
Posts /wp-admin/edit.php2.35 ▼1.0513.29 ▼40.86
Add New Post /wp-admin/post-new.php2.35 ▼3.5812.79 ▼92.67
Media Library /wp-admin/upload.php2.35 ▼0.9213.11 ▼25.08

Server storage [IO: ▲0.03MB] [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: 22 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_background_slideshow
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for RokGallery Background Slideshow
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.101.84 ▲0.1340.20 ▼0.36
Dashboard /wp-admin2,198 ▲275.62 ▲0.1184.90 ▼5.0039.02 ▼5.19
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0739.87 ▲0.1138.46 ▲1.07
Add New Post /wp-admin/post-new.php1,526 ▼023.07 ▼0.61642.16 ▼47.0349.92 ▼10.99
Media Library /wp-admin/upload.php1,397 ▼34.18 ▼0.0898.36 ▼19.6642.93 ▼7.12

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method RokGallery_Background_Slideshow_Widget::register() should not be called statically
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_background_slideshow
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/rokgallery-background-slideshow/views/widget.php
    • > /wp-content/plugins/rokgallery-background-slideshow/init.php
    • > /wp-content/plugins/rokgallery-background-slideshow/views/form.php

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: background, slider, widget, gallery, slideshow...

rokgallery-background-slideshow/init.php 85% from 13 tests

"RokGallery Background Slideshow" version 0.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("rokgallery-background-slideshow.php" instead of "init.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 141 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin481 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript17860317
PHP32534142
CSS12222

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.55
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods436.36%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
15 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/overlays/09.png0.20KB0.10KB▼ 50.48%
assets/overlays/03.png0.20KB0.10KB▼ 53.11%
assets/overlays/10.png0.13KB0.10KB▼ 22.63%
assets/overlays/12.png0.13KB0.11KB▼ 13.85%
assets/overlays/15.png0.13KB0.12KB▼ 13.87%