84% base64-shortlinks

Code Review | Base64 Shortlinks

WordPress plugin Base64 Shortlinks scored84%from 54 tests.

About plugin

  • Plugin page: base64-shortlinks
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-6.0.2
  • WordPress version: 6.3.1
  • First release: Aug 12, 2011
  • Latest release: Sep 11, 2022
  • Number of updates: 22
  • Update frequency: every 184.0 days
  • Top authors: jwz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

A check of server-side resources used by Base64 Shortlinks
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0439.98 ▼2.59
Dashboard /wp-admin3.36 ▲0.0546.77 ▼6.18
Posts /wp-admin/edit.php3.41 ▲0.0550.26 ▲2.85
Add New Post /wp-admin/post-new.php5.94 ▲0.05104.57 ▲1.01
Media Library /wp-admin/upload.php3.28 ▲0.0542.19 ▲6.54
Base64 Shortlinks /wp-admin/options-general.php?page=base64-shortlinks3.2531.16

Server storage [IO: ▲0.02MB] [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: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Base64 Shortlinks: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.27 ▼0.261.90 ▼0.2440.40 ▼6.50
Dashboard /wp-admin2,202 ▲315.59 ▲0.0188.78 ▼3.3439.79 ▼5.66
Posts /wp-admin/edit.php2,104 ▲41.97 ▼0.0635.54 ▼1.8536.81 ▲0.43
Add New Post /wp-admin/post-new.php1,529 ▲123.02 ▼0.12694.85 ▲39.1453.97 ▲1.36
Media Library /wp-admin/upload.php1,407 ▲74.23 ▲0.02102.87 ▲0.2845.02 ▼1.05
Base64 Shortlinks /wp-admin/options-general.php?page=base64-shortlinks8591.9932.0629.17

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/base64-shortlinks/base64-shortlinks.php:139

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 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
1 plugin tags: shortlinks

base64-shortlinks/base64-shortlinks.php 92% from 13 tests

Analyzing the main PHP file in "Base64 Shortlinks" version 1.6
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 246 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected299 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP192112299

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin