90% gallery-image-captions

Code Review | Gallery Image Captions (GIC)

WordPress plugin Gallery Image Captions (GIC) scored 90% from 54 tests.

About plugin

  • Plugin page: gallery-image-cap...
  • Plugin version: 1.4.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 6, 2020
  • Latest release: Dec 18, 2022
  • Number of updates: 30
  • Update frequency: every 33.9 days
  • Top authors: mlchaves (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 2,384 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Gallery Image Captions (GIC)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0438.53 ▼6.32
Dashboard /wp-admin3.34 ▲0.0351.23 ▲5.73
Posts /wp-admin/edit.php3.39 ▲0.0347.26 ▲0.07
Add New Post /wp-admin/post-new.php5.92 ▲0.0394.64 ▼7.72
Media Library /wp-admin/upload.php3.26 ▲0.0336.89 ▲3.92

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Gallery Image Captions (GIC)
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6814.48 ▲0.082.03 ▼0.0746.29 ▼4.34
Dashboard /wp-admin2,206 ▲214.85 ▼0.06106.66 ▲5.6642.82 ▼2.57
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0340.12 ▼0.7435.23 ▼0.62
Add New Post /wp-admin/post-new.php1,533 ▲523.31 ▲5.04671.06 ▼32.2265.08 ▲13.30
Media Library /wp-admin/upload.php1,391 ▲34.30 ▲0.00101.56 ▼8.2644.10 ▼2.61

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: captions, filter, images, shortcode, css...

gallery-image-captions/gallery-image-captions.php Passed 13 tests

Analyzing the main PHP file in "Gallery Image Captions (GIC)" version 1.4.0
63 characters long description:
Creates a filter to customise WordPress gallery image captions.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin212 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP149111212

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.59
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%
Functions5
▷ Named functions5100.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
PNG images were not found in this plugin