90% mailroad-switch

Code Review | Mailroad Switch

WordPress plugin Mailroad Switch scored90%from 54 tests.

About plugin

  • Plugin page: mailroad-switch
  • Plugin version: 1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.7.2
  • WordPress version: 6.3.1
  • First release: Jun 10, 2021
  • Latest release: Jun 10, 2021
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: marsworks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /320 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

Analyzing server-side resources used by Mailroad Switch
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1237.94 ▲0.73
Dashboard /wp-admin3.42 ▲0.1246.31 ▼1.66
Posts /wp-admin/edit.php3.53 ▲0.1846.76 ▼2.82
Add New Post /wp-admin/post-new.php6.02 ▲0.1483.67 ▼4.77
Media Library /wp-admin/upload.php3.34 ▲0.1233.84 ▼0.49

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Mailroad Switch
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6113.71 ▼0.881.58 ▼0.0040.56 ▼3.71
Dashboard /wp-admin2,210 ▲195.85 ▲0.95102.15 ▼1.8937.64 ▼7.44
Posts /wp-admin/edit.php2,096 ▲42.02 ▲0.0640.49 ▼1.3734.07 ▼1.50
Add New Post /wp-admin/post-new.php1,521 ▼1223.39 ▲0.33679.33 ▼8.5048.76 ▼6.18
Media Library /wp-admin/upload.php1,395 ▲74.24 ▼0.0494.64 ▼14.1940.69 ▼5.46

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: recipients, recipient, admin, rerouting, separate...

mailroad-switch/mailroad-switch.php 92% from 13 tests

The main PHP script in "Mailroad Switch" version 1.0 is automatically included on every request by WordPress
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 161 characters long)

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
Success! There were no dangerous files found in this plugin1,000 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP19415270944
CSS11133
JavaScript10118
JSON1005

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity8.69
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes969.23%
Methods60
▷ Static methods2745.00%
▷ Public methods5795.00%
▷ Protected methods00.00%
▷ Private methods35.00%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin