89% redirects-for-wp

Code Review | WP 301 Redirects by WPBranch

WordPress plugin WP 301 Redirects by WPBranch scored89%from 54 tests.

About plugin

  • Plugin page: redirects-for-wp
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Oct 4, 2022
  • Latest release: Oct 4, 2022
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: wpbranch (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /430 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.02MB] [CPU: ▼4.06ms] Passed 4 tests

This is a short check of server-side resources used by WP 301 Redirects by WPBranch
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.62 ▼0.21
Dashboard /wp-admin3.33 ▲0.0346.64 ▲1.53
Posts /wp-admin/edit.php3.39 ▲0.0342.67 ▼7.61
Add New Post /wp-admin/post-new.php5.92 ▲0.0380.08 ▼8.35
Media Library /wp-admin/upload.php3.26 ▲0.0334.03 ▼0.05
WP 301 Redirects /wp-admin/options-general.php?page=wp_redirect_options3.2331.53

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 39 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
wp301redirects_version

Browser metrics Passed 4 tests

An overview of browser requirements for WP 301 Redirects by WPBranch
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.25 ▼0.311.76 ▲0.0643.47 ▲0.53
Dashboard /wp-admin2,199 ▲225.51 ▼0.1684.88 ▼6.3837.61 ▼0.98
Posts /wp-admin/edit.php2,104 ▲41.97 ▼0.0133.78 ▼1.1736.48 ▲1.48
Add New Post /wp-admin/post-new.php1,531 ▲222.98 ▼0.09650.23 ▼32.5851.76 ▼7.82
Media Library /wp-admin/upload.php1,401 ▲14.19 ▲0.0093.66 ▼15.8540.49 ▼7.20
WP 301 Redirects /wp-admin/options-general.php?page=wp_redirect_options9172.5943.2937.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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • wp301redirects_version
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

redirects-for-wp/301-redirects.php 85% from 13 tests

"WP 301 Redirects by WPBranch" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • 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: It is recommended to name the main PHP file as the plugin slug ("redirects-for-wp.php" instead of "301-redirects.php")

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
Success! There were no dangerous files found in this plugin1,279 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP181904631,024
SVG807202
JavaScript24447
JSON1005
CSS1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity14.83
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.03
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes18.33%
Methods81
▷ Static methods2227.16%
▷ Public methods7896.30%
▷ Protected methods00.00%
▷ Private methods33.70%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants9
▷ Global constants9100.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
6 PNG files occupy 0.26MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png6.90KB3.06KB▼ 55.66%
.wordpress-org/icon-128x128.png6.90KB3.06KB▼ 55.66%
.wordpress-org/banner-1544x500.png40.33KB18.49KB▼ 54.17%
.wordpress-org/screenshot-1.png175.14KB46.82KB▼ 73.27%
.wordpress-org/banner-772x250.png18.24KB8.63KB▼ 52.67%