84% redirect-emails-on-staging

Code Review | Redirect Emails on Staging

WordPress plugin Redirect Emails on Staging scored84%from 54 tests.

About plugin

  • Plugin page: redirect-emails-o...
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.3.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.0-5.9
  • WordPress version: 6.3.1
  • First release: Aug 1, 2013
  • Latest release: Mar 19, 2022
  • Number of updates: 10
  • Update frequency: every 315.2 days
  • Top authors: JPry (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,634 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.00MB] [CPU: ▼4.50ms] Passed 4 tests

This is a short check of server-side resources used by Redirect Emails on Staging
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.84 ▼1.09
Dashboard /wp-admin3.31 ▲0.0143.75 ▼3.70
Posts /wp-admin/edit.php3.36 ▲0.0045.11 ▼3.04
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.68 ▼8.07
Media Library /wp-admin/upload.php3.23 ▲0.0034.32 ▼3.18

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Redirect Emails on Staging
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.25 ▼1.045.57 ▲3.8837.85 ▼4.29
Dashboard /wp-admin2,203 ▲144.83 ▼0.13111.69 ▼5.8342.03 ▼1.08
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0239.53 ▼0.4137.17 ▲1.64
Add New Post /wp-admin/post-new.php1,540 ▲223.38 ▲0.24670.28 ▼16.1162.19 ▲8.07
Media Library /wp-admin/upload.php1,388 ▼04.25 ▲0.0699.52 ▲0.8841.06 ▼6.12

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
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/redirect-emails-on-staging/redirect-emails-on-staging.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: email, wpengine

redirect-emails-on-staging/redirect-emails-on-staging.php 85% from 13 tests

The main PHP file in "Redirect Emails on Staging" ver. 1.2.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("3.5.2" instead of "5.5.0")
  • Description: Please don't use more than 140 characters for the plugin description (currently 158 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected742 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP10157413621
JSON40062
XML1171659

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity24.25
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods40
▷ Static methods1845.00%
▷ Public methods3895.00%
▷ Protected methods00.00%
▷ Private methods25.00%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants1
▷ Global constants1100.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
No PNG files were detected