72% shortlink-column

Code Review | Shortlink & File URL Column

WordPress plugin Shortlink & File URL Column scored72%from 54 tests.

About plugin

  • Plugin page: shortlink-column
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.7
  • WordPress version: 6.3.1
  • First release: Dec 9, 2015
  • Latest release: Aug 20, 2016
  • Number of updates: 25
  • Update frequency: every 14.6 days
  • Top authors: harman79 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /2,451 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼2.54MB] [CPU: ▼516,122.31ms] Passed 4 tests

An overview of server-side resources used by Shortlink & File URL Column
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▼10.6538.47 ▼2,064,472.16
Dashboard /wp-admin3.52 ▲0.1752.48 ▼0.95
Posts /wp-admin/edit.php3.63 ▲0.2449.69 ▼0.72
Add New Post /wp-admin/post-new.php6.10 ▲0.1797.24 ▼15.41
Media Library /wp-admin/upload.php3.44 ▲0.1742.62 ▲4.07
Shortlink Column /wp-admin/options-general.php?page=shortlink-column3.3936.60

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
slc79_options_val
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Shortlink & File URL Column
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.25 ▼0.021.55 ▼0.2941.90 ▼1.71
Dashboard /wp-admin2,208 ▲315.63 ▼0.0586.82 ▼7.2740.96 ▼2.53
Posts /wp-admin/edit.php2,151 ▲512.00 ▲0.0535.14 ▼4.9433.42 ▼2.41
Add New Post /wp-admin/post-new.php1,535 ▲623.13 ▼0.50678.27 ▲7.9457.42 ▼3.64
Media Library /wp-admin/upload.php1,415 ▲154.21 ▲0.01102.34 ▲0.8447.90 ▲0.89
Shortlink Column /wp-admin/options-general.php?page=shortlink-column8651.9924.2230.78

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • slc79_options_val
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=shortlink-column
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=shortlink-column
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/shortlink-column/shortlink-col-main.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/shortlink-column/shortlink-col-options.php:218

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === shortlink-column === )
You can look at the official readme.txt

shortlink-column/shortlink-col-main.php 85% from 13 tests

The main PHP script in "Shortlink & File URL Column" version 1.5 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 143 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("shortlink-column.php" instead of "shortlink-col-main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin379 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP26243371
JavaScript1018

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.76
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions990.00%
▷ Anonymous functions110.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin