77% pg-slideshow-gallery

Code Review | PG Slideshow-Gallery

WordPress plugin PG Slideshow-Gallery scored77%from 54 tests.

About plugin

  • Plugin page: pg-slideshow-gallery
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.0.1
  • WordPress version: 6.3.1
  • First release: Aug 8, 2022
  • Latest release: Dec 27, 2022
  • Number of updates: 25
  • Update frequency: every 5.8 days
  • Top authors: oscomsupport (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /704 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▼3.12ms] Passed 4 tests

Analyzing server-side resources used by PG Slideshow-Gallery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2148.73 ▲6.80
Dashboard /wp-admin3.51 ▲0.1653.63 ▼14.29
Posts /wp-admin/edit.php3.62 ▲0.2653.32 ▲0.91
Add New Post /wp-admin/post-new.php6.22 ▲0.3394.26 ▼1.97
Media Library /wp-admin/upload.php3.43 ▲0.2039.10 ▲2.86
General Settings /wp-admin/edit.php?post_type=portgal&page=general_settings3.7042.33

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for PG Slideshow-Gallery
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲4813.30 ▼1.224.36 ▲2.3932.69 ▼10.70
Dashboard /wp-admin2,235 ▲554.90 ▼0.75100.56 ▲8.1047.63 ▲8.64
Posts /wp-admin/edit.php2,126 ▲262.35 ▲0.4035.32 ▼1.8137.93 ▼1.04
Add New Post /wp-admin/post-new.php6,236 ▲4,71019.15 ▼4.10941.18 ▲321.6751.72 ▼6.26
Media Library /wp-admin/upload.php1,447 ▲474.52 ▲0.3093.58 ▼10.5048.80 ▲2.75
General Settings /wp-admin/edit.php?post_type=portgal&page=general_settings2,1513.5043.3827.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_pgwidget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/pg-slideshow-gallery/views/PSG_PGPostType/settings.php
  • 28× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/pg-slideshow-gallery/views/PSG_PGSlideshowSlide/skitterfrontend_attachment.php on line 13
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/pg-slideshow-gallery/views/PSG_PGSlideshowSlide/galleryfrontend_attachment.php on line 11
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/pg-slideshow-gallery/views/PSG_PG/skitter.php on line 1
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/pg-slideshow-gallery/views/PSG_PGPostType/settings.php on line 1
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/pg-slideshow-gallery/views/PSG_PGPostType/style-settings.php on line 1
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/pg-slideshow-gallery/views/PSG_PGSCRIPTS/skitter.php on line 3
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/pg-slideshow-gallery/views/PSG_PGPostType/pgtabs.php on line 1
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/pg-slideshow-gallery/views/PSG_PG/slideshow.php on line 1
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/pg-slideshow-gallery/views/PSG_PGSlideshowSlide/backend_templates.php on line 1
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/pg-slideshow-gallery/views/PSG_PGSCRIPTS/bxslider.php on line 3

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 errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

pg-slideshow-gallery/gallery.php 77% from 13 tests

The main PHP file in "PG Slideshow-Gallery" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("pg-slideshow-gallery.php" instead of "gallery.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 288 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
Success! There were no dangerous files found in this plugin15,173 lines of code in 82 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript231,7851,3959,376
PHP411,1918383,785
CSS11230351,748
SVG400236
JSON10014
Sass21014

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity20.67
▷ Minimum class complexity1.00
▷ Maximum class complexity77.00
Average method complexity4.67
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods65
▷ Static methods6092.31%
▷ Public methods6295.38%
▷ Protected methods00.00%
▷ Private methods34.62%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
16 PNG files occupy 0.11MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/PGPostType/textadd_icon.png11.95KB2.60KB▼ 78.27%
images/PGPostType/imageadd_icon.png12.65KB2.74KB▼ 78.31%
images/PG/light-controlpanel.png2.90KB0.23KB▼ 92.08%
images/PGPostType/textadd_icon1.png15.00KB1.54KB▼ 89.73%
images/PG/dark-bullet.png2.91KB0.22KB▼ 92.59%