68% autoshortlink

Code Review | AutoShortLink

WordPress plugin AutoShortLink scored68%from 54 tests.

About plugin

  • Plugin page: autoshortlink
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.1
  • WordPress version: 6.3.1
  • First release: Oct 2, 2016
  • Latest release: Mar 15, 2019
  • Number of updates: 4
  • Update frequency: every 223.8 days
  • Top authors: prasadkirpekar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,412 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.91MB] [CPU: ▼39.43ms] Passed 4 tests

This is a short check of server-side resources used by AutoShortLink
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.0138.29 ▼10.83
Dashboard /wp-admin3.33 ▼0.3025.80 ▼41.40
Posts /wp-admin/edit.php3.33 ▼0.3529.70 ▼24.48
Add New Post /wp-admin/post-new.php3.33 ▼2.8228.52 ▼76.38
Media Library /wp-admin/upload.php3.33 ▼0.1623.09 ▼15.46
AutoShortLink /wp-admin/options-general.php?page=autoshortlink3.3329.66

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
asl_api_key
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by AutoShortLink
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6514.39 ▲0.091.87 ▲0.0942.77 ▼5.35
Dashboard /wp-admin2,204 ▲245.61 ▼0.0692.38 ▲2.9038.75 ▼6.18
Posts /wp-admin/edit.php2,113 ▲132.01 ▼0.0440.70 ▼0.4136.02 ▼2.45
Add New Post /wp-admin/post-new.php1,562 ▲1723.33 ▲0.07657.13 ▼70.5653.31 ▼16.14
Media Library /wp-admin/upload.php1,406 ▲34.21 ▼0.1796.96 ▼8.2545.89 ▼1.61
AutoShortLink /wp-admin/options-general.php?page=autoshortlink8052.0725.2629.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • asl_api_key
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=autoshortlink
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

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
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: action_url in wp-content/plugins/autoshortlink/admin/options.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/autoshortlink/admin/options.php:4

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Please fix this invalid url: "-"
  • Screenshots: These screenshots require images: #1 (Settings Window), #2 (Before activation), #3 (After activation)
The official readme.txt is a good inspiration

autoshortlink/autoshortlink.php Passed 13 tests

The primary PHP file in "AutoShortLink" version 1.1 is used by WordPress to initiate all plugin functionality
89 characters long description:
Forget the hassle of creating shorte.st shortlinks manually. This Plugin do that for you.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin96 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2291396

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin