84% force-domain-redirect

Code Review | Force Domain Redirect

WordPress plugin Force Domain Redirect scored84%from 54 tests.

About plugin

  • Plugin page: force-domain-redi...
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.8.3
  • WordPress version: 6.3.1
  • First release: Sep 1, 2014
  • Latest release: Jan 20, 2022
  • Number of updates: 6
  • Update frequency: every 450.2 days
  • Top authors: nimusdigital (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /5,525 total downloads

Benchmarks

Plugin footprint 83% 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.00MB] [CPU: ▼6.24ms] Passed 4 tests

Server-side resources used by Force Domain Redirect
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.68 ▼2.10
Dashboard /wp-admin3.31 ▲0.0049.61 ▲1.43
Posts /wp-admin/edit.php3.36 ▲0.0048.71 ▼2.11
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.73 ▼19.53
Media Library /wp-admin/upload.php3.23 ▲0.0036.46 ▼1.20

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Force Domain Redirect
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.45 ▲0.121.92 ▼0.2044.21 ▼0.53
Dashboard /wp-admin2,195 ▲185.49 ▼0.1198.70 ▲11.0941.44 ▼4.65
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0235.87 ▼4.8035.72 ▲0.85
Add New Post /wp-admin/post-new.php1,526 ▼023.06 ▼0.15623.03 ▼75.4348.29 ▼8.47
Media Library /wp-admin/upload.php1,400 ▼04.29 ▲0.09104.78 ▼9.0744.22 ▼2.27

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/force-domain-redirect/force-domain-redirect.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 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: redirect, url, domain, 301, rewrite...

force-domain-redirect/force-domain-redirect.php Passed 13 tests

The main PHP file in "Force Domain Redirect" ver. 0.3 adds more information about the plugin and also serves as the entry point for this plugin
36 characters long description:
Forces the use of the main WP domain

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin15 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP131115

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin