84% image-caption-links

Code Review | Image Caption Links

WordPress plugin Image Caption Links scored84%from 54 tests.

About plugin

  • Plugin page: image-caption-links
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.4.1
  • WordPress version: 6.3.1
  • First release: Apr 1, 2011
  • Latest release: Sep 13, 2012
  • Number of updates: 10
  • Update frequency: every 53.2 days
  • Top authors: mmuro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,696 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.01MB] [CPU: ▼1.38ms] Passed 4 tests

An overview of server-side resources used by Image Caption Links
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0138.37 ▼8.85
Dashboard /wp-admin3.32 ▲0.0145.41 ▲0.95
Posts /wp-admin/edit.php3.37 ▲0.0146.93 ▼3.81
Add New Post /wp-admin/post-new.php5.90 ▲0.0197.82 ▲6.19
Media Library /wp-admin/upload.php3.24 ▲0.0144.03 ▲11.14

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Image Caption Links
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲3013.66 ▼0.691.77 ▼0.5642.36 ▼1.52
Dashboard /wp-admin2,206 ▲184.86 ▼0.99100.85 ▼12.4040.29 ▲0.36
Posts /wp-admin/edit.php2,089 ▼32.05 ▼0.0136.67 ▼7.5440.00 ▲4.97
Add New Post /wp-admin/post-new.php1,533 ▼023.17 ▼0.43653.03 ▲10.2953.19 ▼5.75
Media Library /wp-admin/upload.php1,388 ▲34.24 ▲0.06102.55 ▼3.0047.81 ▲2.28

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% 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)
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/image-caption-links/image-caption-links.php:31

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: captions, links, images

image-caption-links/image-caption-links.php Passed 13 tests

Analyzing the main PHP file in "Image Caption Links" version 1.1
63 characters long description:
Automatically add links to the full size images below captions.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected37 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1153532
CSS1005

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin