77% image-source-by-id

Code Review | Image Source by Image ID

WordPress plugin Image Source by Image ID scored77%from 54 tests.

About plugin

  • Plugin page: image-source-by-id
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 5, 2018
  • Latest release: Aug 19, 2023
  • Number of updates: 7
  • Update frequency: every 271.7 days
  • Top authors: Litonice13 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,107 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.81MB] [CPU: ▲1,077.43ms] 50% from 4 tests

An overview of server-side resources used by Image Source by Image ID
Please have a look at the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 1,350.53ms on /wp-admin/options-general.php?page=image-source-by-id-recommended-plugins)
  • Extra CPU: The extra CPU usage should be kept under 200.00ms (currently 1,077.43ms on /wp-admin/options-general.php?page=image-source-by-id-recommended-plugins)
PageMemory (MB)CPU Time (ms)
Home /4.31 ▲0.84661.19 ▲618.86
Dashboard /wp-admin4.25 ▲0.941,484.45 ▲1,431.37
Posts /wp-admin/edit.php4.19 ▲0.831,323.29 ▲1,266.77
Add New Post /wp-admin/post-new.php6.67 ▲0.781,301.89 ▲1,192.07
Media Library /wp-admin/upload.php4.02 ▲0.791,270.66 ▲1,232.00
Image Src by ID /wp-admin/options-general.php?page=img-src-by-id4.001,240.16
Recommended /wp-admin/options-general.php?page=image-source-by-id-recommended-plugins4.001,350.53

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 44 new files
Database: no new tables, 13 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
jlt_image_source_id_notice_subscribe
jlt_image_source_id_notice_what_we_collect
jlt_image_source_id_activation_time
jlt_image_source_id_sheet_promo_data
jlt_image_source_id_notice_ask_for_rating
...

Browser metrics Passed 4 tests

An overview of browser requirements for Image Source by Image ID
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,962 ▲20114.39 ▲0.071.94 ▲0.0336.86 ▼5.75
Dashboard /wp-admin2,344 ▲1635.60 ▼0.0291.76 ▼16.2039.64 ▼3.10
Posts /wp-admin/edit.php2,201 ▲982.15 ▲0.1638.64 ▼5.7636.82 ▼0.88
Add New Post /wp-admin/post-new.php1,620 ▲9421.67 ▼1.48663.62 ▼13.7157.74 ▼2.64
Media Library /wp-admin/upload.php1,498 ▲1014.19 ▲0.01111.05 ▼3.4445.36 ▼9.37
Image Src by ID /wp-admin/options-general.php?page=img-src-by-id9871.8231.4726.09
Recommended /wp-admin/options-general.php?page=image-source-by-id-recommended-plugins1,2721.7430.6830.96

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 13 options
    • jlt_image_source_id_sheet_promo_data
    • jlt_image_source_id_sheet_promo_data_hash
    • widget_theysaidso_widget
    • jlt_image_source_id_notice_subscribe
    • widget_recent-comments
    • theysaidso_admin_options
    • jlt_image_source_id_activation_time
    • jlt_image_source_id_notice_ask_for_rating
    • db_upgraded
    • jlt_image_source_id_notice_what_we_collect
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
The following issues need your attention
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'JLTISRC\\Inc\\Classes\otifications\\Model\\Popup' not found in wp-content/plugins/image-source-by-id/Inc/Classes/Notifications/Upgrade_Notice.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'JLTISRC\\Libs\\Recommended' not found in wp-content/plugins/image-source-by-id/Inc/Classes/Recommended_Plugins.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'JLTISRC\\Libs\\Upgrader' not found in wp-content/plugins/image-source-by-id/Inc/Classes/Upgrade_Plugin.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'JLTISRC\\Inc\\Classes\otifications\\Model\otice' not found in wp-content/plugins/image-source-by-id/Inc/Classes/Notifications/Subscribe.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/image-source-by-id/image-source-by-id.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'JLTISRC\\Inc\\Classes\otifications\\Model\otice' not found in wp-content/plugins/image-source-by-id/Inc/Classes/Notifications/What_We_Collect.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'JLTISRC\\Inc\\Classes\otifications\\Model\otice' not found in wp-content/plugins/image-source-by-id/Inc/Classes/Notifications/Ask_For_Rating.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'JLTISRC\\Libs\\RowLinks' not found in wp-content/plugins/image-source-by-id/Inc/Classes/Row_Links.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=image-source-by-id-recommended-plugins
    • > Network (severe)
    https://ps.w.org/ultimate-blocks-for-gutenberg/assets/icon-128x128.png - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: image id, img src by id, img src by image id, image source by image id, img src

image-source-by-id/image-source-by-id.php 85% from 13 tests

"Image Source by Image ID" version 1.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages/")
  • Domain Path: The domain path must begin with a forward slash character ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected3,896 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
PHP387661,4363,085
CSS311814606
JavaScript2209205

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity10.76
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.49
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces8
Interfaces0
Traits2
Classes27
▷ Abstract classes414.81%
▷ Concrete classes2385.19%
▷ Final classes14.35%
Methods192
▷ Static methods3216.67%
▷ Public methods18998.44%
▷ Protected methods10.52%
▷ Private methods21.04%
Functions9
▷ Named functions555.56%
▷ Anonymous functions444.44%
Constants16
▷ Global constants1593.75%
▷ Class constants16.25%
▷ Public constants1100.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
PNG images were not found in this plugin