84% return-shortlink-button

Code Review | Return shortlink button

WordPress plugin Return shortlink button scored84%from 54 tests.

About plugin

  • Plugin page: return-shortlink-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.9
  • WordPress version: 6.3.1
  • First release: Feb 17, 2016
  • Latest release: Feb 15, 2022
  • Number of updates: 14
  • Update frequency: every 156.4 days
  • Top authors: CheGevara29 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,239 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Return shortlink button
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.68 ▼2.22
Dashboard /wp-admin3.31 ▲0.0148.63 ▲0.06
Posts /wp-admin/edit.php3.36 ▲0.0052.14 ▼1.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.60 ▼23.35
Media Library /wp-admin/upload.php3.23 ▲0.0038.20 ▲3.46

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Return shortlink button
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.01 ▼0.162.09 ▲0.1540.89 ▼10.09
Dashboard /wp-admin2,198 ▲185.61 ▼0.0386.08 ▼7.4041.62 ▲0.02
Posts /wp-admin/edit.php2,103 ▼01.95 ▼0.0139.77 ▼3.1835.68 ▼4.15
Add New Post /wp-admin/post-new.php1,528 ▲223.27 ▲0.15657.60 ▼50.0758.60 ▼5.52
Media Library /wp-admin/upload.php1,400 ▼34.16 ▼0.0596.94 ▼10.0743.35 ▼2.74

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 were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/return-shortlink-button/return-shortlink-button.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: shortlink, admin, edit, link

return-shortlink-button/return-shortlink-button.php Passed 13 tests

"Return shortlink button" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
38 characters long description:
Return "shortlink" button on edit page

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected3 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1083

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
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
No PNG images were found in this plugin