10% short-link

Code Review | Short Link

WordPress plugin Short Link scored10%from 54 tests.

About plugin

  • Plugin page: short-link
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-3.5
  • WordPress version: 6.3.1
  • First release: Dec 29, 2012
  • Latest release: Dec 29, 2012
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: prasannasp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,474 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/short-link/short-link.php+76
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.39ms] Passed 4 tests

This is a short check of server-side resources used by Short Link
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.31 ▲1.73
Dashboard /wp-admin3.33 ▲0.0345.86 ▼7.60
Posts /wp-admin/edit.php3.38 ▲0.0344.19 ▼1.73
Add New Post /wp-admin/post-new.php5.91 ▲0.0386.90 ▼11.25
Media Library /wp-admin/upload.php3.26 ▲0.0333.68 ▼0.99
Short Link /wp-admin/options-general.php?page=short-link/short-link.php3.2230.97

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
short_link_options

Browser metrics Passed 4 tests

Short Link: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.22 ▼1.161.75 ▼0.6743.64 ▼9.63
Dashboard /wp-admin2,213 ▲224.87 ▼0.17101.12 ▼7.1237.19 ▼9.15
Posts /wp-admin/edit.php2,093 ▲12.00 ▼0.0533.10 ▼1.5933.55 ▲0.13
Add New Post /wp-admin/post-new.php1,522 ▲823.41 ▲5.75595.84 ▼77.4054.52 ▲4.64
Media Library /wp-admin/upload.php1,392 ▲44.18 ▼0.0598.05 ▼0.4744.25 ▲2.37
Short Link /wp-admin/options-general.php?page=short-link/short-link.php9162.0526.1429.53

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/short-link/short-link.php:44

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Short Link on a post as seen in firefox), #2 (Short Link as seen in Chromium Browser), #3 (Short Link selected in click), #4 (Short Link plugin options page)
You can take inspiration from this readme.txt

short-link/short-link.php 92% from 13 tests

The primary PHP file in "Short Link" version 1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 167 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin151 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13231151

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.13MB with 0.08MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png72.08KB24.70KB▼ 65.73%
screenshot-4.png40.15KB15.07KB▼ 62.46%
screenshot-2.png6.12KB2.30KB▼ 62.36%
screenshot-3.png14.23KB5.32KB▼ 62.63%