74% wp-reroute-email

Code Review | WP Reroute Email

WordPress plugin WP Reroute Email scored74%from 54 tests.

About plugin

  • Plugin page: wp-reroute-email
  • Plugin version: 1.5.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 2, 2013
  • Latest release: Jul 4, 2023
  • Number of updates: 92
  • Update frequency: every 40.4 days
  • Top authors: msh134 (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /17,700 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼6.62ms] Passed 4 tests

An overview of server-side resources used by WP Reroute Email
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1738.48 ▼1.39
Dashboard /wp-admin3.47 ▲0.1250.77 ▼8.51
Posts /wp-admin/edit.php3.52 ▲0.1645.16 ▼2.98
Add New Post /wp-admin/post-new.php5.99 ▲0.1082.41 ▼13.60
Media Library /wp-admin/upload.php3.33 ▲0.1033.55 ▼0.79

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 23 new files
Database: 1 new table, 7 new options
New tables
wp_wpre_emails
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
wpremail_db_version
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WP Reroute Email
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲9513.69 ▼0.704.38 ▲2.6244.37 ▼1.31
Dashboard /wp-admin2,222 ▲374.89 ▼0.95114.30 ▲17.0643.31 ▼0.42
Posts /wp-admin/edit.php2,105 ▲162.05 ▼0.0133.42 ▼6.9434.39 ▼1.35
Add New Post /wp-admin/post-new.php1,550 ▲3123.14 ▼0.08668.31 ▼19.7353.45 ▼12.61
Media Library /wp-admin/upload.php1,407 ▲194.19 ▼0.07103.18 ▲8.1645.60 ▲0.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie tables were found after uninstall: 1 table
    • wp_wpre_emails
  • This plugin does not fully uninstall, leaving 7 options in the database
    • wpremail_db_version
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
The following issues need your attention
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-reroute-email/wp-reroute-email.php on line 374
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHWPINC/class-phpmailer.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-reroute-email/wp-reroute-email.php on line 384
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-reroute-email/wp-reroute-email.php on line 384
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-reroute-email/wp-reroute-email.php on line 384
    • > PHP Warning
      require_once(ABSPATHWPINC/class-phpmailer.php): failed to open stream: No such file or directory in wp-content/plugins/wp-reroute-email/wp-reroute-email.php on line 384
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-reroute-email/wp-reroute-email.php on line 374

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Settings page), #2 (List for stored email in database), #3 (Details of the email), #4 (Original email view), #5 (Email test form)
The official readme.txt is a good inspiration

wp-reroute-email/wp-reroute-email.php 92% from 13 tests

Analyzing the main PHP file in "WP Reroute Email" version 1.5.0
Please take the time to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected1,690 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP62756141,251
PO File41560364
JavaScript15041
CSS10034

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity37.00
▷ Minimum class complexity1.00
▷ Maximum class complexity125.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods75
▷ Static methods00.00%
▷ Public methods4762.67%
▷ Protected methods2128.00%
▷ Private methods79.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
5 PNG files occupy 0.26MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png95.92KB36.16KB▼ 62.30%
screenshot-4.png62.28KB23.03KB▼ 63.03%
screenshot-1.png27.09KB15.79KB▼ 41.71%
screenshot-3.png47.04KB17.37KB▼ 63.07%
screenshot-5.png37.05KB14.79KB▼ 60.08%