84% site-url-shortcode

Code Review | Site URL Shortcode

WordPress plugin Site URL Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: site-url-shortcode
  • Plugin version: 1.02
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7.4
  • WordPress version: 6.3.1
  • First release: May 1, 2017
  • Latest release: May 1, 2017
  • Number of updates: 10
  • Update frequency: N/A
  • Top authors: robertpbellamy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /1,776 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.38ms] Passed 4 tests

Server-side resources used by Site URL Shortcode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.22 ▼2.89
Dashboard /wp-admin3.31 ▲0.0148.14 ▼1.07
Posts /wp-admin/edit.php3.36 ▲0.0050.20 ▼0.43
Add New Post /wp-admin/post-new.php5.89 ▲0.0196.64 ▼5.12
Media Library /wp-admin/upload.php3.23 ▲0.0042.44 ▲5.24

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Site URL Shortcode: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2913.24 ▼1.321.64 ▼0.4340.47 ▼6.33
Dashboard /wp-admin2,221 ▲185.77 ▼0.1498.42 ▼5.8942.63 ▼0.43
Posts /wp-admin/edit.php2,103 ▼01.97 ▼0.0840.69 ▼2.0436.54 ▼3.26
Add New Post /wp-admin/post-new.php1,555 ▲2418.06 ▼5.09667.10 ▲21.4062.09 ▲4.73
Media Library /wp-admin/upload.php1,397 ▼04.25 ▲0.03100.38 ▼7.1744.55 ▼0.31

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
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 is_admin() in wp-content/plugins/site-url-shortcode/site-url-shortcode.php:12

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 Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
There were no plugin tags found

site-url-shortcode/site-url-shortcode.php Passed 13 tests

This is the main PHP file of "Site URL Shortcode" version 1.02, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
94 characters long description:
Use the [site-url] shortcode anywhere throughout your site in place of the wordpress site url.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin20 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP181720

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
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 functions133.33%
▷ Anonymous functions266.67%
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