84% wp-shortlinks

Code Review | Get Shortlinks

WordPress plugin Get Shortlinks scored84%from 54 tests.

About plugin

  • Plugin page: wp-shortlinks
  • Plugin version: 0.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.2.2
  • WordPress version: 6.3.1
  • First release: Dec 18, 2018
  • Latest release: Aug 15, 2019
  • Number of updates: 15
  • Update frequency: every 16.3 days
  • Top authors: kosvrouvas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,629 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Server-side resources used by Get Shortlinks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.97 ▲1.81
Dashboard /wp-admin3.31 ▼0.0344.56 ▼13.43
Posts /wp-admin/edit.php3.37 ▲0.0145.40 ▼1.69
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.53 ▼16.86
Media Library /wp-admin/upload.php3.24 ▲0.0133.16 ▲0.65

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Get Shortlinks
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.26 ▼0.301.69 ▲0.1643.37 ▲3.89
Dashboard /wp-admin2,208 ▲335.66 ▲0.0486.50 ▼9.5839.45 ▼5.53
Posts /wp-admin/edit.php2,110 ▲102.13 ▲0.1835.57 ▼0.5435.71 ▼0.52
Add New Post /wp-admin/post-new.php1,533 ▼623.56 ▲0.46656.89 ▼4.4549.54 ▼4.36
Media Library /wp-admin/upload.php1,413 ▲134.23 ▼0.0396.04 ▼8.1441.22 ▼5.78

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • 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
Everything seems fine, however 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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-shortlinks/shortlink.php:13

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 issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: shortlink, short, shortlinks, getshortlink, bitly

wp-shortlinks/shortlink.php 85% from 13 tests

This is the main PHP file of "Get Shortlinks" version 0.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-shortlinks.php" instead of "shortlink.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin71 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1141444
Markdown19027

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.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
There were not PNG files found in your plugin