89% rng-shortlink

Code Review | rng-shrotlink

WordPress plugin rng-shrotlink scored89%from 54 tests.

About plugin

  • Plugin page: rng-shortlink
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1
  • WordPress version: 6.3.1
  • First release: Mar 11, 2019
  • Latest release: May 8, 2019
  • Number of updates: 9
  • Update frequency: every 6.6 days
  • Top authors: asabagh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /647 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.08MB] [CPU: ▼9.53ms] Passed 4 tests

Server-side resources used by rng-shrotlink
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0840.82 ▼3.40
Dashboard /wp-admin3.39 ▲0.0950.29 ▼4.97
Posts /wp-admin/edit.php3.51 ▲0.1558.49 ▲10.05
Add New Post /wp-admin/post-new.php5.29 ▼0.6066.62 ▼28.10
Media Library /wp-admin/upload.php3.32 ▲0.0937.79 ▼1.65
Shortlink Settings /wp-admin/options-general.php?page=shortlink-settings3.2837.72
Click View /wp-admin/tools.php?page=shl_click_view3.3136.26

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
rngshl_configure_dismiss
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for rng-shrotlink
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲7514.64 ▲0.061.89 ▲0.0642.52 ▼3.30
Dashboard /wp-admin2,220 ▲435.65 ▲0.0085.03 ▼9.1443.63 ▼0.31
Posts /wp-admin/edit.php2,123 ▲261.95 ▼0.0640.62 ▲5.2740.01 ▲3.60
Add New Post /wp-admin/post-new.php6,245 ▲4,71919.09 ▼4.28916.56 ▲212.1355.27 ▼1.85
Media Library /wp-admin/upload.php1,422 ▲254.21 ▼0.0196.23 ▼19.7842.12 ▼8.28
Shortlink Settings /wp-admin/options-general.php?page=shortlink-settings8172.0126.5028.18
Click View /wp-admin/tools.php?page=shl_click_view8401.6825.9328.64

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

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 93% from 29 tests

readme.txt 94% 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: You can take inspiration from this readme.txt

rng-shortlink/rng-shortlink.php 92% from 13 tests

The main file in "rng-shrotlink" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 156 characters long)

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
There were no executable files found in this plugin783 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP1583187509
CSS13997
JavaScript14475
PO File1252975
Markdown19027

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity8.00
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity1.76
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods37
▷ Static methods00.00%
▷ Public methods2978.38%
▷ Protected methods00.00%
▷ Private methods821.62%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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