84% rebrandly-domain-redirect

Code Review | Rebrandly Redirect

WordPress plugin Rebrandly Redirect scored84%from 54 tests.

About plugin

  • Plugin page: rebrandly-domain-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.9
  • WordPress version: 6.3.1
  • First release: Feb 17, 2022
  • Latest release: Oct 6, 2022
  • Number of updates: 13
  • Update frequency: every 17.8 days
  • Top authors: rebrandly (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /813 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.02MB] [CPU: ▼4.10ms] Passed 4 tests

Analyzing server-side resources used by Rebrandly Redirect
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.76 ▼4.22
Dashboard /wp-admin3.33 ▲0.0250.11 ▼0.43
Posts /wp-admin/edit.php3.38 ▲0.0251.29 ▼0.64
Add New Post /wp-admin/post-new.php5.92 ▲0.0488.64 ▼11.12
Media Library /wp-admin/upload.php3.25 ▲0.0241.94 ▲1.15
Rebrandly /wp-admin/options-general.php?page=rebrandly-domain-redirect3.2433.05

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Rebrandly Redirect
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,931 ▲17013.93 ▼0.458.89 ▲7.1440.40 ▼7.58
Dashboard /wp-admin2,229 ▲264.88 ▼0.05112.86 ▲3.5544.30 ▲3.57
Posts /wp-admin/edit.php2,111 ▲82.01 ▼0.0337.49 ▼6.3134.58 ▼1.01
Add New Post /wp-admin/post-new.php1,536 ▼1123.20 ▲0.21603.51 ▼77.6444.68 ▲1.39
Media Library /wp-admin/upload.php1,408 ▲84.15 ▲0.07113.99 ▼4.4548.08 ▼3.57
Rebrandly /wp-admin/options-general.php?page=rebrandly-domain-redirect7962.0524.3125.99

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

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=rebrandly-domain-redirect
    • > Notice in wp-content/plugins/rebrandly-domain-redirect/admin/partials/alias-field.php+12
    Trying to access array offset on value of type bool

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid url: ""
The official readme.txt is a good inspiration

rebrandly-domain-redirect/rebrandly-domain-redirect.php Passed 13 tests

This is the main PHP file of "Rebrandly Redirect" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
104 characters long description:
Connect your WordPress application with Rebrandly and create branded links re-using the same domain name

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 plugin270 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP11126515246
Markdown16015
JavaScript24546
CSS2183

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity1.86
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
Functions3
▷ Named functions3100.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
4 PNG files occupy 0.45MB with 0.33MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png186.51KB45.70KB▼ 75.50%
assets/screenshot-5.png180.82KB44.24KB▼ 75.53%
assets/screenshot-4.png39.01KB10.59KB▼ 72.84%
assets/screenshot-3.png53.06KB16.69KB▼ 68.56%