84% image-links

Code Review | Image Links

WordPress plugin Image Links scored84%from 54 tests.

About plugin

  • Plugin page: image-links
  • Plugin version: 1.4
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.0
  • WordPress version: 6.3.1
  • First release: Sep 4, 2018
  • Latest release: Jun 23, 2022
  • Number of updates: 12
  • Update frequency: every 115.8 days
  • Top authors: Patabugen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /908 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Image Links
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0336.50 ▼4.43
Dashboard /wp-admin3.34 ▼0.0146.15 ▼12.40
Posts /wp-admin/edit.php3.39 ▲0.0347.82 ▲1.76
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.51 ▼13.80
Media Library /wp-admin/upload.php3.26 ▲0.0334.09 ▼0.86

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Image Links
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.31 ▼0.341.92 ▲0.3238.46 ▼4.10
Dashboard /wp-admin2,198 ▲215.54 ▲0.0383.91 ▲2.3237.89 ▼5.05
Posts /wp-admin/edit.php2,097 ▼02.03 ▲0.0734.39 ▲1.1134.83 ▼0.06
Add New Post /wp-admin/post-new.php1,526 ▼023.10 ▼0.08602.64 ▼78.0848.52 ▼2.04
Media Library /wp-admin/upload.php1,397 ▼34.25 ▲0.0893.34 ▼7.6240.06 ▼3.18

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_image_size() in wp-content/plugins/image-links/image-links.php:19

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
There were no plugin tags found

image-links/image-links.php 92% from 13 tests

Analyzing the main PHP file in "Image Links" version 1.4
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin373 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
Sass1345187
PHP12871152
JavaScript141433
CSS1041

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods450.00%
▷ Public methods562.50%
▷ Protected methods00.00%
▷ Private methods337.50%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin