93% wpi-home-url-shortcode

Code Review | WPi Home Url Shortcode - Use home_url in any post using shortcode [wpi_home_url]

WordPress plugin WPi Home Url Shortcode - Use home_url in any post using shortcode [wpi_home_url] scored 93% from 54 tests.

About plugin

  • Plugin page: wpi-home-url-shor...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 5.9.2
  • First release: Jan 21, 2015
  • Latest release: Jan 21, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: wooprali (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 683 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼606.72ms] Passed 4 tests

This is a short check of server-side resources used by WPi Home Url Shortcode - Use home_url in any post using shortcode [wpi_home_url]
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0154.93 ▲3.72
Dashboard /wp-admin3.41 ▲0.0132.24 ▲0.23
Posts /wp-admin/edit.php3.65 ▲0.0134.83 ▼5.58
Add New Post /wp-admin/post-new.php6.88 ▼0.0991.76 ▼2,421.32
Media Library /wp-admin/upload.php3.30 ▲0.0024.45 ▼0.22

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

WPi Home Url Shortcode - Use home_url in any post using shortcode [wpi_home_url]: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲5115.85 ▲0.195.87 ▲0.082.74 ▲0.60
Dashboard /wp-admin2,895 ▲346.26 ▲0.10116.33 ▼17.55157.99 ▼7.08
Posts /wp-admin/edit.php2,691 ▲33.25 ▲0.0265.23 ▼0.90140.99 ▲1.48
Add New Post /wp-admin/post-new.php1,752 ▲4121.55 ▲0.79467.09 ▲5.96156.05 ▼2.37
Media Library /wp-admin/upload.php1,698 ▼35.45 ▼0.07149.13 ▼1.00190.91 ▼0.84

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wpi-home-url-shortcode/wp-home-url-shortcode.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 ()
The official readme.txt might help

wpi-home-url-shortcode/wp-home-url-shortcode.php 77% from 13 tests

This is the main PHP file of "WPi Home Url Shortcode - Use home_url in any post using shortcode [wpi_home_url]" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path points to an invalid folder, "/locale/" does not exist
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wpi-home-url-shortcode.php" instead of "wp-home-url-shortcode.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
Everything looks great! No dangerous files found in this plugin17 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP101217

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin