84% image-source-overlay

Code Review | Image Source Overlay

WordPress plugin Image Source Overlay scored84%from 54 tests.

About plugin

  • Plugin page: image-source-overlay
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1
  • WordPress version: 6.3.1
  • First release: Sep 15, 2022
  • Latest release: Nov 2, 2022
  • Number of updates: 8
  • Update frequency: every 6.0 days
  • Top authors: stehled (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /661 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.82ms] Passed 4 tests

Analyzing server-side resources used by Image Source Overlay
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.54 ▼1.49
Dashboard /wp-admin3.33 ▲0.0249.24 ▼10.55
Posts /wp-admin/edit.php3.44 ▲0.0853.23 ▲4.58
Add New Post /wp-admin/post-new.php5.91 ▲0.0295.32 ▲1.52
Media Library /wp-admin/upload.php3.25 ▲0.0236.17 ▼0.77
Image SO Settings /wp-admin/tools.php?page=image_so3.2734.98

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 11 new options
New WordPress options
image_so_version_number
widget_recent-comments
image_so_only_post
db_upgraded
theysaidso_admin_options
image_so_position
image_so_source_text
can_compress_scripts
widget_recent-posts
image_so_nofollow
...

Browser metrics Passed 4 tests

An overview of browser requirements for Image Source Overlay
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8513.68 ▼0.931.86 ▼0.0943.47 ▲0.31
Dashboard /wp-admin2,213 ▲255.91 ▲1.0498.22 ▼18.3835.28 ▼11.21
Posts /wp-admin/edit.php2,090 ▼22.04 ▲0.0339.97 ▲4.3035.52 ▲2.42
Add New Post /wp-admin/post-new.php1,539 ▲623.36 ▲0.06642.50 ▼43.0070.92 ▲14.44
Media Library /wp-admin/upload.php1,389 ▼24.23 ▲0.0399.62 ▼4.0146.40 ▼0.72
Image SO Settings /wp-admin/tools.php?page=image_so9302.0424.7128.02

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 9 options in the database
    • image_so_nofollow
    • image_so_version_number
    • db_upgraded
    • widget_recent-posts
    • image_so_only_post
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/image-source-overlay/image-source-overlay.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Image_SO\\Inc\\Core\\Image_SO_Base' not found in wp-content/plugins/image-source-overlay/inc/core/class.image_so_updater.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/image-source-overlay/inc/admin/views/admin_page.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Image_SO\\Inc\\Core\\Image_SO_Base' not found in wp-content/plugins/image-source-overlay/inc/core/class.image_so_init.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Image_SO\\Inc\\Core\\Image_SO_Base' not found in wp-content/plugins/image-source-overlay/inc/admin/class.image_so_admin.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need your attention: Please take inspiration from this readme.txt

image-source-overlay/image-source-overlay.php Passed 13 tests

The main PHP file in "Image Source Overlay" ver. 1.1.1 adds more information about the plugin and also serves as the entry point for this plugin
32 characters long description:
Adds overlay with image sources.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin430 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP954105390
CSS18040

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity7.60
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes5
▷ Abstract classes120.00%
▷ Concrete classes480.00%
▷ Final classes375.00%
Methods23
▷ Static methods28.70%
▷ Public methods1773.91%
▷ Protected methods28.70%
▷ Private methods417.39%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin