84% multiple-domain

Code Review | Multiple Domain

WordPress plugin Multiple Domain scored84%from 54 tests.

About plugin

  • Plugin page: multiple-domain
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7
  • WordPress version: 6.3.1
  • First release: Jul 29, 2016
  • Latest release: Apr 11, 2021
  • Number of updates: 60
  • Update frequency: every 28.6 days
  • Top authors: GustavoStraube (91.67%)sirjavik (10%)

Code review

54 tests

User reviews

26 reviews

Install metrics

20,000+ active /125,884 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼4.42ms] Passed 4 tests

An overview of server-side resources used by Multiple Domain
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1639.27 ▼4.47
Dashboard /wp-admin3.46 ▲0.1647.63 ▲0.18
Posts /wp-admin/edit.php3.57 ▲0.2247.26 ▲2.07
Add New Post /wp-admin/post-new.php6.04 ▲0.1584.44 ▼12.38
Media Library /wp-admin/upload.php3.38 ▲0.1536.94 ▼1.02

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
multiple-domain-add-canonical
widget_recent-posts
multiple-domain-ignore-default-ports
multiple-domain-domains
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Multiple Domain
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2914.26 ▼0.101.88 ▲0.0539.04 ▼5.49
Dashboard /wp-admin2,195 ▲155.61 ▼0.0890.10 ▼8.0540.13 ▲0.50
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0134.67 ▼3.9135.06 ▼2.63
Add New Post /wp-admin/post-new.php1,526 ▼223.05 ▲0.09633.49 ▼29.2655.11 ▲1.43
Media Library /wp-admin/upload.php1,403 ▼04.15 ▼0.0497.44 ▼1.9344.93 ▲0.65

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 9 options
    • multiple-domain-add-canonical
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • multiple-domain-domains
    • multiple-domain-ignore-default-ports
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/multiple-domain/views/lang.php:9
    • > PHP Notice
      Undefined variable: fields in wp-content/plugins/multiple-domain/views/domains.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/multiple-domain/views/heading.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/multiple-domain/views/domains.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/multiple-domain/multiple-domain.php:54
    • > PHP Notice
      Undefined variable: count in wp-content/plugins/multiple-domain/views/fields.php on line 10
    • > PHP Notice
      Undefined variable: count in wp-content/plugins/multiple-domain/views/lang.php on line 8
    • > PHP Notice
      Undefined variable: ignoreDefaultPorts in wp-content/plugins/multiple-domain/views/options.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/multiple-domain/views/fields.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/multiple-domain/views/options.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: domains, multiple, redirect

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

The principal PHP file in "Multiple Domain" v. 1.0.7 is loaded by WordPress automatically on each request
128 characters long description:
This plugin allows you to have multiple domains in a single WordPress installation and enables custom redirects for each domain.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin808 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP8148750663
PO File22424129
JavaScript15016

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity30.50
▷ Minimum class complexity20.00
▷ Maximum class complexity41.00
Average method complexity2.02
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods58
▷ Static methods35.17%
▷ Public methods3560.34%
▷ Protected methods00.00%
▷ Private methods2339.66%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants11
▷ Global constants872.73%
▷ Class constants327.27%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin