84% default-image-link

Code Review | Default Image Link

WordPress plugin Default Image Link scored84%from 54 tests.

About plugin

  • Plugin page: default-image-link
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 6.3.1
  • First release: Nov 4, 2013
  • Latest release: Dec 23, 2013
  • Number of updates: 12
  • Update frequency: every 4.1 days
  • Top authors: jruizcantero (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

400+ active /7,473 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼6.22ms] Passed 4 tests

A check of server-side resources used by Default Image Link
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.79 ▼8.31
Dashboard /wp-admin3.31 ▼0.0355.23 ▼3.39
Posts /wp-admin/edit.php3.36 ▲0.0149.45 ▲6.29
Add New Post /wp-admin/post-new.php5.89 ▲0.0180.85 ▼11.32
Media Library /wp-admin/upload.php3.24 ▲0.0133.74 ▼1.87
Default Image Link /wp-admin/options-general.php?page=jrc-default-image-link3.2030.02

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Default Image Link
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.15 ▼0.201.75 ▲0.0448.20 ▲8.93
Dashboard /wp-admin2,199 ▲195.59 ▼0.0490.53 ▲6.8543.75 ▼2.99
Posts /wp-admin/edit.php2,104 ▲71.96 ▼0.0644.02 ▲8.3232.19 ▼2.75
Add New Post /wp-admin/post-new.php1,540 ▲1218.48 ▼4.76631.44 ▼31.4379.82 ▲20.17
Media Library /wp-admin/upload.php1,398 ▼54.20 ▼0.0694.94 ▼5.8545.93 ▼0.75
Default Image Link /wp-admin/options-general.php?page=jrc-default-image-link9092.0424.4032.38

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • 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)
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/default-image-link/default-image-link.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% 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 to be fixed:
  • Tags: Please delete some tags, you are using 20 tag instead of maximum 10
Please take inspiration from this readme.txt

default-image-link/default-image-link.php 92% from 13 tests

Analyzing the main PHP file in "Default Image Link" version 1.1
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 156 characters long)

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
Good job! No executable or dangerous file extensions detected174 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1271493
PO File2265281

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 complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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 are no PNG files in this plugin