84% simple-redirects

Code Review | Simple Redirects

WordPress plugin Simple Redirects scored84%from 54 tests.

About plugin

  • Plugin page: simple-redirects
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.3
  • WordPress version: 6.3.1
  • First release: Nov 10, 2020
  • Latest release: Feb 23, 2021
  • Number of updates: 5
  • Update frequency: every 21.0 days
  • Top authors: mishalpatel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /451 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.04MB] [CPU: ▼5.58ms] Passed 4 tests

This is a short check of server-side resources used by Simple Redirects
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0335.65 ▼4.29
Dashboard /wp-admin3.34 ▲0.0444.02 ▼7.02
Posts /wp-admin/edit.php3.39 ▲0.0448.57 ▲5.06
Add New Post /wp-admin/post-new.php5.92 ▲0.0483.19 ▼11.88
Media Library /wp-admin/upload.php3.26 ▲0.0436.01 ▲0.89
Simple Redirects /wp-admin/options-general.php?page=simple-redirects3.2331.44

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Redirects
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8314.63 ▲0.242.01 ▲0.1938.18 ▼8.58
Dashboard /wp-admin2,213 ▲254.81 ▼1.06109.22 ▲1.9537.94 ▼5.97
Posts /wp-admin/edit.php2,096 ▲71.99 ▼0.0139.14 ▼2.9535.97 ▲0.50
Add New Post /wp-admin/post-new.php1,540 ▲2623.28 ▲5.72669.55 ▲47.1159.03 ▲8.69
Media Library /wp-admin/upload.php1,395 ▲134.21 ▼0.1098.32 ▲2.1741.87 ▲0.74
Simple Redirects /wp-admin/options-general.php?page=simple-redirects1,0042.0723.3329.75

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-redirects/wp-simple-redirects.php:335

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: simple redirects, 301 redirect, redirect, https, seo redirect...

simple-redirects/wp-simple-redirects.php 92% from 13 tests

The entry point to "Simple Redirects" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-redirects.php" instead of "wp-simple-redirects.php")

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 plugin200 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP147101200

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity4.56
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin