84% relative-image-urls

Code Review | Relative Image URLs

WordPress plugin Relative Image URLs scored 84% from 54 tests.

About plugin

  • Plugin page: relative-image-urls
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-4.0
  • WordPress version: 6.3.1
  • First release: Apr 7, 2010
  • Latest release: Sep 5, 2014
  • Number of updates: 11
  • Update frequency: every 147.5 days
  • Top authors: scottwerner (81.82%)bluelayermedia (27.27%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active / 20,074 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: ▼5.05ms] Passed 4 tests

Server-side resources used by Relative Image URLs
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.62 ▼5.36
Dashboard /wp-admin3.31 ▲0.0151.28 ▲5.07
Posts /wp-admin/edit.php3.36 ▲0.0144.71 ▼3.22
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.46 ▼11.02
Media Library /wp-admin/upload.php3.23 ▲0.0036.43 ▼0.58

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Relative Image URLs
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.45 ▼0.381.76 ▼0.0938.08 ▼3.62
Dashboard /wp-admin2,203 ▲215.84 ▲0.9696.00 ▼7.6436.38 ▼3.72
Posts /wp-admin/edit.php2,068 ▼182.00 ▼0.0136.35 ▼0.7533.32 ▲0.02
Add New Post /wp-admin/post-new.php1,528 ▼523.17 ▲0.14605.19 ▲13.0374.84 ▼14.68
Media Library /wp-admin/upload.php1,388 ▼34.19 ▲0.0294.53 ▼9.8241.55 ▼0.97

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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 server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/relative-image-urls/relativeimage.php:12

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (Shows the difference between absolute and relative image URLs in the WordPress post editor.)
The official readme.txt is a good inspiration

relative-image-urls/relativeimage.php 92% from 13 tests

Analyzing the main PHP file in "Relative Image URLs" version 2.0
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("relative-image-urls.php" instead of "relativeimage.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected14 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17914

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png40.14KB11.93KB▼ 70.27%