84% relative-url

Code Review | Relative URL

WordPress plugin Relative URL scored84%from 54 tests.

About plugin

  • Plugin page: relative-url
  • Plugin version: 0.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 2.1.0-5.8
  • WordPress version: 6.3.1
  • First release: Sep 16, 2012
  • Latest release: Aug 11, 2021
  • Number of updates: 63
  • Update frequency: every 51.6 days
  • Top authors: Sparanoid (100%)

Code review

54 tests

User reviews

26 reviews

Install metrics

4,000+ active /97,352 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.16MB] [CPU: ▼7.72ms] Passed 4 tests

Analyzing server-side resources used by Relative URL
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1335.86 ▼3.58
Dashboard /wp-admin3.47 ▲0.1744.10 ▼6.81
Posts /wp-admin/edit.php3.50 ▲0.1547.70 ▼1.49
Add New Post /wp-admin/post-new.php6.14 ▲0.2676.06 ▼18.98
Media Library /wp-admin/upload.php3.41 ▲0.1831.27 ▲0.33

Server storage [IO: ▲0.01MB] [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
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Relative URL: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.22 ▼1.341.79 ▲0.0243.97 ▼0.21
Dashboard /wp-admin2,206 ▲155.85 ▲0.89107.30 ▲7.5141.80 ▼2.09
Posts /wp-admin/edit.php2,092 ▲32.03 ▼0.0139.76 ▼0.7936.12 ▼0.40
Add New Post /wp-admin/post-new.php1,529 ▲922.98 ▼0.11630.67 ▲1.8057.67 ▲0.66
Media Library /wp-admin/upload.php1,391 ▲64.21 ▼0.02103.09 ▲7.1147.53 ▲5.27

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
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/relative-url/relative-url.php:136

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 27 tag instead of maximum 10
The official readme.txt is a good inspiration

relative-url/relative-url.php 92% from 13 tests

The principal PHP file in "Relative URL" v. 0.1.8 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 233 characters long)

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
PHP11410914

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin