10% relative-url-for-img-and-a-tags

Code Review | Relative URL for Img and A Tags

WordPress plugin Relative URL for Img and A Tags scored 10% from 53 tests.

About plugin

  • Plugin page: relative-url-for-...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.3-5.5.3
  • WordPress version: 5.8.1
  • First release: Jun 29, 2016
  • Latest release: Nov 22, 2020
  • Number of updates: 18
  • Update frequency: every 89.3 days
  • Top authors: edesac (100%)

Code review

53 tests

User reviews

1 review

Install metrics

200+ active / 3,150 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/relative-url-for-img-and-a-tags/relative-url-for-img-and-a-tags.php+23
    Undefined index: path

Server metrics [RAM: ▼1.85MB] [CPU: ▼319.20ms] Passed 4 tests

This is a short check of server-side resources used by Relative URL for Img and A Tags
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.78 ▼1.056.11 ▼23.41
Dashboard /wp-admin1.80 ▼1.255.73 ▼43.11
Posts /wp-admin/edit.php1.80 ▼1.305.63 ▼38.12
Add New Post /wp-admin/post-new.php1.80 ▼3.635.22 ▼1,164.33
Media Library /wp-admin/upload.php1.80 ▼1.207.47 ▼31.23

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Relative URL for Img and A Tags
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,674 ▲6815.91 ▲0.439.70 ▲0.4155.98 ▲3.63
Dashboard /wp-admin2,931 ▲816.13 ▲0.28147.51 ▲17.76111.48 ▲6.49
Posts /wp-admin/edit.php2,706 ▼02.68 ▼0.0165.84 ▼0.0094.73 ▼6.45
Add New Post /wp-admin/post-new.php1,656 ▲318.29 ▼0.44399.38 ▲28.26121.25 ▲9.49
Media Library /wp-admin/upload.php1,772 ▼05.00 ▼0.03166.90 ▲3.12119.48 ▼9.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/relative-url-for-img-and-a-tags/relative-url-for-img-and-a-tags.php+23
    Undefined index: path

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
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 plugin_dir_url() in wp-content/plugins/relative-url-for-img-and-a-tags/relative-url-for-img-and-a-tags.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: remove root url from image link tags, relative links, relative image source

relative-url-for-img-and-a-tags/relative-url-for-img-and-a-tags.php Passed 13 tests

"Relative URL for Img and A Tags" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
122 characters long description:
This plugin will filter the content of your posts and pages to remove the root of the domain from links and image sources.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin73 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1312473

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.03
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods375.00%
▷ Protected methods125.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin