77% multiple-domain-mapping-on-single-site

Code Review | Multiple Domain Mapping on Single Site

WordPress plugin Multiple Domain Mapping on Single Site scored77%from 54 tests.

About plugin

  • Plugin page: multiple-domain-m...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3
  • WordPress version: 6.3.1
  • First release: Jun 27, 2016
  • Latest release: Aug 5, 2023
  • Number of updates: 52
  • Update frequency: every 49.9 days
  • Top authors: matthias.wagner (100%)

Code review

54 tests

User reviews

39 reviews

Install metrics

7,000+ active /93,777 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.22MB] [CPU: ▼0.09ms] Passed 4 tests

Server-side resources used by Multiple Domain Mapping on Single Site
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2348.83 ▲2.01
Dashboard /wp-admin3.51 ▲0.2053.93 ▲0.12
Posts /wp-admin/edit.php3.63 ▲0.2757.44 ▲6.24
Add New Post /wp-admin/post-new.php6.12 ▲0.2390.88 ▼8.71
Media Library /wp-admin/upload.php3.44 ▲0.2043.75 ▲7.96
Multidomain /wp-admin/tools.php?page=multiple-domain-mapping-on-single-site/multidomainmapping.php3.3843.06

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Multiple Domain Mapping on Single Site
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲4914.37 ▼0.001.77 ▼0.0945.47 ▲0.84
Dashboard /wp-admin2,216 ▲365.69 ▲0.1295.62 ▼0.3443.07 ▲1.03
Posts /wp-admin/edit.php2,124 ▲242.06 ▲0.0942.75 ▲3.6137.00 ▼2.68
Add New Post /wp-admin/post-new.php1,546 ▲2023.12 ▲0.05665.06 ▼1.3056.62 ▼10.51
Media Library /wp-admin/upload.php1,424 ▲244.29 ▲0.09104.36 ▲1.0543.71 ▼3.62
Multidomain /wp-admin/tools.php?page=multiple-domain-mapping-on-single-site/multidomainmapping.php8761.9529.2232.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=multiple-domain-mapping-on-single-site/multidomainmapping.php
    • > Notice in wp-content/plugins/multiple-domain-mapping-on-single-site/multidomainmapping.php+425
    Undefined variable: cnt

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
Please take a closer look at the following
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/multiple-domain-mapping-on-single-site/includes/upgrades/latestupgradenotice.php
    • > /wp-content/plugins/multiple-domain-mapping-on-single-site/multidomainmapping.php
    • > /wp-content/plugins/multiple-domain-mapping-on-single-site/includes/upgrades/v_1_0.php

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)
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can look at the official readme.txt

multiple-domain-mapping-on-single-site/multidomainmapping.php 77% from 13 tests

"Multiple Domain Mapping on Single Site" version 1.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("multiple-domain-mapping-on-single-site.php" instead of "multidomainmapping.php")
  • 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 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin840 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP5135186656
CSS1258163
JavaScript13321

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity123.00
▷ Minimum class complexity123.00
▷ Maximum class complexity123.00
Average method complexity3.65
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods46
▷ Static methods12.17%
▷ Public methods3576.09%
▷ Protected methods00.00%
▷ Private methods1123.91%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin