84% featured-image-gallery-widget

Code Review | Featured Image Gallery Widget

WordPress plugin Featured Image Gallery Widget scored84%from 54 tests.

About plugin

  • Plugin page: featured-image-ga...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3
  • WordPress version: 6.3.1
  • First release: Nov 9, 2018
  • Latest release: Sep 18, 2023
  • Number of updates: 7
  • Update frequency: every 254.0 days
  • Top authors: celloexpressions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,224 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.15ms] Passed 4 tests

An overview of server-side resources used by Featured Image Gallery Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.71 ▼1.54
Dashboard /wp-admin3.34 ▲0.0345.03 ▼1.13
Posts /wp-admin/edit.php3.39 ▲0.0348.64 ▲4.14
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.99 ▼14.06
Media Library /wp-admin/upload.php3.26 ▲0.0337.79 ▲5.54

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_featured_image_gallery_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Featured Image Gallery Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.111.88 ▲0.1838.81 ▼4.53
Dashboard /wp-admin2,203 ▲124.84 ▼1.04105.90 ▲0.6241.23 ▲2.09
Posts /wp-admin/edit.php2,089 ▲32.01 ▲0.0139.01 ▲2.6735.13 ▼2.56
Add New Post /wp-admin/post-new.php1,533 ▲1423.71 ▲0.25668.47 ▲22.5347.86 ▼18.77
Media Library /wp-admin/upload.php1,388 ▼04.24 ▼0.0494.83 ▼6.8841.69 ▼1.61

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_featured_image_gallery_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Please take a closer look at the following
  • 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/featured-image-gallery-widget/featured-image-gallery-widget.php:33

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

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
4 plugin tags: gallery, media, image, widget

featured-image-gallery-widget/featured-image-gallery-widget.php Passed 13 tests

The main PHP script in "Featured Image Gallery Widget" version 1.0 is automatically included on every request by WordPress
80 characters long description:
Dynamically summarize the images featured on a page's posts in a gallery widget.

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
No dangerous file extensions were detected111 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12240111

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin