90% bring-back-the-get-shortlink-button

Code Review | Bring Back the Get Shortlink Button

WordPress plugin Bring Back the Get Shortlink Button scored90%from 54 tests.

About plugin

  • Plugin page: bring-back-the-ge...
  • Plugin version: 2.1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.1
  • WordPress version: 6.3.1
  • First release: Dec 14, 2015
  • Latest release: Feb 24, 2023
  • Number of updates: 6
  • Update frequency: every 438.2 days
  • Top authors: tfrommen (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /13,678 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.14ms] Passed 4 tests

This is a short check of server-side resources used by Bring Back the Get Shortlink Button
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.09 ▲0.27
Dashboard /wp-admin3.31 ▲0.0156.42 ▲9.52
Posts /wp-admin/edit.php3.36 ▲0.0045.62 ▼3.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.30 ▼16.09
Media Library /wp-admin/upload.php3.23 ▲0.0035.73 ▲2.58

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Bring Back the Get Shortlink Button
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.63 ▼0.954.96 ▲3.1742.79 ▲0.38
Dashboard /wp-admin2,206 ▲184.81 ▼1.09112.33 ▲11.2941.98 ▼3.16
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0338.85 ▲1.9033.35 ▼2.83
Add New Post /wp-admin/post-new.php1,538 ▲522.94 ▲2.10632.23 ▼54.6858.60 ▼2.24
Media Library /wp-admin/upload.php1,379 ▼64.17 ▼0.0799.97 ▼10.2543.11 ▼2.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: shortlink, link, short

bring-back-the-get-shortlink-button/bring-back-the-get-shortlink-button.php Passed 13 tests

"Bring Back the Get Shortlink Button" version 2.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
97 characters long description:
This plugin brings back the Get Shortlink button, which is hidden by default since WordPress 4.4.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected12 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP173312

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
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
Namespaces1
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%
Functions2
▷ Named functions2100.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
There are no PNG files in this plugin