84% bitly-shortlinks-multisite

Code Review | Bit.ly Shortlinks Multisite (Uses OAuth 2 API)

WordPress plugin Bit.ly Shortlinks Multisite (Uses OAuth 2 API) scored84%from 54 tests.

About plugin

  • Plugin page: bitly-shortlinks-...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.2
  • WordPress version: 6.3.1
  • First release: Mar 15, 2013
  • Latest release: Jul 2, 2013
  • Number of updates: 28
  • Update frequency: every 4.1 days
  • Top authors: spiffyd (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /2,532 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.01MB] [CPU: ▼6.74ms] Passed 4 tests

A check of server-side resources used by Bit.ly Shortlinks Multisite (Uses OAuth 2 API)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.62 ▼4.63
Dashboard /wp-admin3.32 ▲0.0149.70 ▲0.83
Posts /wp-admin/edit.php3.37 ▲0.0147.68 ▼7.40
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.16 ▼4.29
Media Library /wp-admin/upload.php3.24 ▲0.0133.24 ▼10.63

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Bit.ly Shortlinks Multisite (Uses OAuth 2 API): an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.33 ▲0.051.78 ▲0.0437.41 ▼0.70
Dashboard /wp-admin2,195 ▲185.61 ▼0.0690.13 ▲2.3840.63 ▼4.47
Posts /wp-admin/edit.php2,100 ▼32.01 ▲0.0535.92 ▼1.1231.43 ▼6.27
Add New Post /wp-admin/post-new.php1,537 ▲1118.19 ▼5.06641.49 ▼46.9185.74 ▲22.09
Media Library /wp-admin/upload.php1,400 ▼04.22 ▲0.1399.16 ▼19.3942.34 ▼1.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
The following issues need your attention
  • 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/bitly-shortlinks-multisite/bitly-shortlinks-multisite.php:57

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
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 describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: multisite, bitly, url shortener, shortlinks, shortlink...

bitly-shortlinks-multisite/bitly-shortlinks-multisite.php Passed 13 tests

The primary PHP file in "Bit.ly Shortlinks Multisite (Uses OAuth 2 API)" version 1.2 is used by WordPress to initiate all plugin functionality
129 characters long description:
This plugin replaces the default WordPress shortlinks with Bit.ly shortlinks for your single site or multisite WordPress network.

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
Everything looks great! No dangerous files found in this plugin55 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1212855

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.61
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%
Functions3
▷ Named functions3100.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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png33.47KB12.22KB▼ 63.50%