63% post-gallery-slider

Code Review | Post gallery slider

WordPress plugin Post gallery slider scored63%from 54 tests.

About plugin

  • Plugin page: post-gallery-slider
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-3.9.1
  • WordPress version: 6.3.1
  • First release: Oct 19, 2012
  • Latest release: Jul 25, 2014
  • Number of updates: 32
  • Update frequency: every 20.1 days
  • Top authors: kasparsj (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /11,740 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼1.22MB] [CPU: ▼48.82ms] Passed 4 tests

An overview of server-side resources used by Post gallery slider
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.76 ▼0.7021.30 ▼21.25
Dashboard /wp-admin2.80 ▼0.5415.76 ▼45.45
Posts /wp-admin/edit.php2.80 ▼0.5615.96 ▼36.11
Add New Post /wp-admin/post-new.php2.80 ▼3.0914.26 ▼92.48
Media Library /wp-admin/upload.php2.80 ▼0.4314.77 ▼17.78
Post Gallery Slider /wp-admin/options-general.php?page=post_gallery_slider2.8015.63

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
post_gallery_slider
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Post gallery slider
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.35 ▲0.031.84 ▼0.2944.62 ▲3.58
Dashboard /wp-admin2,199 ▲255.59 ▲0.0288.84 ▼6.7541.03 ▼3.00
Posts /wp-admin/edit.php2,101 ▲11.99 ▲0.0034.96 ▼7.1236.79 ▼0.70
Add New Post /wp-admin/post-new.php1,531 ▼023.21 ▲0.24668.63 ▲1.3851.29 ▼11.20
Media Library /wp-admin/upload.php1,401 ▲44.26 ▲0.10106.23 ▼0.6746.77 ▲0.03
Post Gallery Slider /wp-admin/options-general.php?page=post_gallery_slider9732.0225.7229.19

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/post-gallery-slider/post-gallery-slider.php+44
    Undefined index: restore
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • post_gallery_slider
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 25% 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/options-general.php?page=post_gallery_slider
    • > Notice in wp-content/plugins/post-gallery-slider/post-gallery-slider.php+44
    Undefined index: restore

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/post-gallery-slider/templates/thumbs.php
    • > /wp-content/plugins/post-gallery-slider/templates/footer.php
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: height in wp-content/plugins/post-gallery-slider/templates/gallery.php on line 2
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/post-gallery-slider/templates/thumbs.php on line 3
    • > PHP Notice
      Undefined variable: width in wp-content/plugins/post-gallery-slider/templates/gallery.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_html_class() in wp-content/plugins/post-gallery-slider/templates/slider.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/post-gallery-slider/templates/options-page.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/post-gallery-slider/templates/gallery.php:3
    • > PHP Notice
      Undefined variable: attachments in wp-content/plugins/post-gallery-slider/templates/thumbs.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: gallery thumbnails, slider, post gallery, slideshow

post-gallery-slider/post-gallery-slider.php Passed 13 tests

The main PHP script in "Post gallery slider" version 1.1.1 is automatically included on every request by WordPress
78 characters long description:
Post gallery slider, with thumbnails and with nice animation, and auto height.

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
Good job! No executable or dangerous file extensions detected2,633 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript23561412,338
PHP63016286
CSS1009

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.67
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods888.89%
▷ Protected methods111.11%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin