10% domain-redirect

Code Review | Domain Redirect

WordPress plugin Domain Redirect scored10%from 54 tests.

About plugin

  • Plugin page: domain-redirect
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5
  • WordPress version: 6.3.1
  • First release: Jun 25, 2013
  • Latest release: Jun 25, 2013
  • Number of updates: 2
  • Update frequency: every 111.5 days
  • Top authors: creavince (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /4,000 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/domain-redirect/domain-redirect.php+27
    Methods with the same name as their class will not be constructors in a future version of PHP; vm_domain_redirect has a deprecated constructor

Server metrics [RAM: ▼1.93MB] [CPU: ▼49.41ms] Passed 4 tests

Analyzing server-side resources used by Domain Redirect
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.415.19 ▼39.15
Dashboard /wp-admin2.08 ▼1.235.42 ▼41.93
Posts /wp-admin/edit.php2.08 ▼1.286.04 ▼37.37
Add New Post /wp-admin/post-new.php2.08 ▼3.817.05 ▼79.20
Media Library /wp-admin/upload.php2.08 ▼1.155.11 ▼26.90
Domain Redirections /wp-admin/options-general.php?page=vm_domain_redirections2.085.94

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Domain Redirect
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.69 ▼0.921.80 ▼0.0243.22 ▼1.44
Dashboard /wp-admin2,213 ▲285.88 ▲0.87101.13 ▼4.0639.10 ▼1.30
Posts /wp-admin/edit.php2,093 ▲71.98 ▼0.0334.58 ▼0.9533.90 ▲1.87
Add New Post /wp-admin/post-new.php1,537 ▲1823.25 ▲0.15637.45 ▼28.0847.48 ▼20.08
Media Library /wp-admin/upload.php1,386 ▼24.19 ▼0.0596.81 ▼7.5140.10 ▼4.99
Domain Redirections /wp-admin/options-general.php?page=vm_domain_redirections7832.0628.3332.15

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/domain-redirect/domain-redirect.php+27
    Methods with the same name as their class will not be constructors in a future version of PHP; vm_domain_redirect has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=vm_domain_redirections
    • > Deprecated in wp-content/plugins/domain-redirect/domain-redirect.php+27
    Methods with the same name as their class will not be constructors in a future version of PHP; vm_domain_redirect has a deprecated constructor

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 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/domain-redirect/domain-redirect.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
3 plugin tags: redirect, domain name, vanmeerdervoort

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

"Domain Redirect" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
90 characters long description:
Redirects users to specific page depending on the domain name they entered your site with.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin62 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1183062

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
No PNG files were detected