84% wp-shortlinker

Code Review | WP Shortlinker

WordPress plugin WP Shortlinker scored84%from 54 tests.

About plugin

  • Plugin page: wp-shortlinker
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.1
  • WordPress version: 6.3.1
  • First release: May 13, 2016
  • Latest release: Feb 25, 2019
  • Number of updates: 10
  • Update frequency: every 101.9 days
  • Top authors: varun21 (60%)aniash_29 (50%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,086 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by WP Shortlinker
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0045.07 ▼0.85
Dashboard /wp-admin3.31 ▲0.0146.46 ▼7.50
Posts /wp-admin/edit.php3.36 ▲0.0048.79 ▼3.56
Add New Post /wp-admin/post-new.php5.89 ▲0.00115.06 ▲13.53
Media Library /wp-admin/upload.php3.23 ▲0.0038.42 ▲2.70

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WP Shortlinker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.17 ▼0.101.78 ▼0.1941.38 ▼2.02
Dashboard /wp-admin2,198 ▲245.58 ▼0.0886.84 ▼10.3241.68 ▼3.07
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.1436.66 ▼0.7032.93 ▼0.78
Add New Post /wp-admin/post-new.php1,526 ▼223.06 ▲0.05661.55 ▲47.5654.83 ▲5.18
Media Library /wp-admin/upload.php1,403 ▲34.18 ▼0.0198.73 ▼5.8042.43 ▼3.11

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-shortlinker/wp-shortlinker.php:24

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: shortlinks, 404, not found, permalinks, page not found...

wp-shortlinker/wp-shortlinker.php 92% from 13 tests

The entry point to "WP Shortlinker" version 1.0.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin16 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP172116

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected