84% link-images-to-post

Code Review | Link Images To Post

WordPress plugin Link Images To Post scored84%from 54 tests.

About plugin

  • Plugin page: link-images-to-post
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.6.1
  • WordPress version: 6.3.1
  • First release: Dec 10, 2016
  • Latest release: Dec 12, 2016
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: ClaytonL (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Analyzing server-side resources used by Link Images To Post
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.41 ▼6.06
Dashboard /wp-admin3.31 ▼0.0443.30 ▼14.88
Posts /wp-admin/edit.php3.36 ▲0.0047.83 ▲4.64
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.85 ▼27.60
Media Library /wp-admin/upload.php3.23 ▲0.0036.50 ▲2.57

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Link Images To Post: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.21 ▼1.071.92 ▲0.1340.32 ▼3.17
Dashboard /wp-admin2,209 ▲184.84 ▼0.02110.85 ▲2.0742.17 ▲0.02
Posts /wp-admin/edit.php2,092 ▼01.97 ▼0.0439.81 ▲3.6434.80 ▲3.00
Add New Post /wp-admin/post-new.php1,514 ▼1417.74 ▼5.06644.50 ▼14.3352.75 ▲2.13
Media Library /wp-admin/upload.php1,391 ▲64.19 ▲0.0298.71 ▼2.2042.29 ▼4.09

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/link-images-to-post/link-images-to-post.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: link to, attachment, excerpt, images

link-images-to-post/link-images-to-post.php Passed 13 tests

"Link Images To Post" version 0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
47 characters long description:
Wraps images in a post with a link to that post

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected53 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1151653

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin