78% image-source-control-isc

Code Review | Image Source Control Lite – Show Image Credits and Captions

WordPress plugin Image Source Control Lite – Show Image Credits and Captions scored78%from 54 tests.

About plugin

  • Plugin page: image-source-cont...
  • Plugin version: 2.17.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.4
  • WordPress version: 6.3.1
  • First release: Dec 17, 2012
  • Latest release: Nov 8, 2023
  • Number of updates: 115
  • Update frequency: every 34.6 days
  • Top authors: webzunft (100%)

Code review

54 tests

User reviews

36 reviews

Install metrics

1,000+ active /79,187 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 gracefully, with no errors

Server metrics [RAM: ▲0.42MB] [CPU: ▲1.15ms] Passed 4 tests

This is a short check of server-side resources used by Image Source Control Lite – Show Image Credits and Captions
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.4342.56 ▲0.37
Dashboard /wp-admin3.78 ▲0.4357.51 ▼2.51
Posts /wp-admin/edit.php3.83 ▲0.4753.78 ▲7.16
Add New Post /wp-admin/post-new.php6.30 ▲0.4192.98 ▼0.44
Media Library /wp-admin/upload.php3.64 ▲0.4142.83 ▲9.96
Image Sources  /wp-admin/upload.php?page=isc-sources3.6437.82
Image Sources /wp-admin/options-general.php?page=isc-settings3.6444.88

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 64 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Image Source Control Lite – Show Image Credits and Captions: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲7414.18 ▼0.172.36 ▲0.5544.86 ▼1.45
Dashboard /wp-admin2,212 ▲355.63 ▼0.0191.97 ▼7.1443.36 ▼2.36
Posts /wp-admin/edit.php2,114 ▲141.97 ▲0.0336.27 ▼1.4834.65 ▼3.42
Add New Post /wp-admin/post-new.php1,554 ▲2623.58 ▲0.22682.63 ▲32.8436.91 ▼13.69
Media Library /wp-admin/upload.php1,418 ▲154.21 ▼0.02102.67 ▼0.3441.53 ▼0.38
Image Sources  /wp-admin/upload.php?page=isc-sources9562.1828.3439.41
Image Sources /wp-admin/options-general.php?page=isc-settings1,5341.8328.7941.23

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/image-source-control-isc/public/views/image-source-box.php
  • 49× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: posts_with_images in wp-content/plugins/image-source-control-isc/templates/post_images_list.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'ISC_Admin' not found in wp-content/plugins/image-source-control-isc/admin/templates/settings.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'ISC_Admin' not found in wp-content/plugins/image-source-control-isc/admin/templates/settings/elementor.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/image-source-control-isc/admin/templates/settings/global-list-thumbnail-enable.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/image-source-control-isc/admin/templates/sources/external-images.php:8
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/image-source-control-isc/templates/image_posts_list.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/image-source-control-isc/admin/templates/settings/overlay-advanced-included-images.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'ISC_Model' not found in wp-content/plugins/image-source-control-isc/admin/templates/sources/images-without-sources.php:8
    • > PHP Notice
      Undefined variable: images_with_posts in wp-content/plugins/image-source-control-isc/admin/templates/image-posts-list.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/image-source-control-isc/admin/templates/settings/block-options.php:9

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots need descriptions #2, #3, #4, #5, #6 in image-source-control-isc/assets to your readme.txt
  • Tags: You are using too many tags: 12 tag instead of maximum 10
The official readme.txt might help

image-source-control-isc/isc.php 92% from 13 tests

This is the main PHP file of "Image Source Control Lite – Show Image Credits and Captions" version 2.17.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("image-source-control-isc.php" instead of "isc.php")

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 plugin4,219 lines of code in 61 files:
LanguageFilesBlank linesComment linesLines of code
PHP515571,5453,384
JavaScript772115547
CSS12221121
SVG100118
HTML16049

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity53.50
▷ Minimum class complexity5.00
▷ Maximum class complexity176.00
Average method complexity3.78
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods152
▷ Static methods5032.89%
▷ Public methods14897.37%
▷ Protected methods00.00%
▷ Private methods42.63%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants7
▷ Global constants685.71%
▷ Class constants114.29%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/image_source_control_logo_positive_512px.png6.00KB2.86KB▼ 52.41%