63% domain-mapping-system

Code Review | Domain Mapping System | Manage Multiple Domains in a Single WordPress Site

WordPress plugin Domain Mapping System | Manage Multiple Domains in a Single WordPress Site scored63%from 54 tests.

About plugin

  • Plugin page: domain-mapping-sy...
  • Plugin version: 1.9.5
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.3
  • WordPress version: 6.3.1
  • First release: May 13, 2012
  • Latest release: Nov 30, 2023
  • Number of updates: 111
  • Update frequency: every 38.0 days
  • Top authors: brandonfire (54.05%)deniaz (25.23%)victoralbala (12.61%)juanobrach (10.81%)

Code review

54 tests

User reviews

27 reviews

Install metrics

1,000+ active /45,908 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲5.31MB] [CPU: ▲37.31ms] 75% from 4 tests

A check of server-side resources used by Domain Mapping System | Manage Multiple Domains in a Single WordPress Site
The following require your attention
  • Extra RAM: Extra memory usage should kept under 5MB (currently 5.31MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.87 ▲5.4180.66 ▲40.45
Dashboard /wp-admin8.90 ▲5.5983.66 ▲36.94
Posts /wp-admin/edit.php8.90 ▲5.5487.28 ▲40.10
Add New Post /wp-admin/post-new.php10.57 ▲4.69116.23 ▲31.75
Media Library /wp-admin/upload.php8.90 ▲5.6775.45 ▲44.34
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius8.9069.71

Server storage [IO: ▲5.51MB] [DB: ▲0.01MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please fix the following
  • You have illegally modified 1 file (1.07KB) outside of "wp-content/plugins/domain-mapping-system/" and "wp-content/uploads/"
    • (new file) wp-content/mu-plugins/dms-helper.php
Filesystem: 258 new files
Database: 2 new tables, 14 new options
New tables
wp_dms_mappings
wp_dms_mapping_values
New WordPress options
dms_use_categories
fs_debug_mode
theysaidso_admin_options
fs_active_plugins
dms_use_page
widget_recent-posts
dms_api_secret
dms_version
dms_use_post
widget_recent-comments
...

Browser metrics Passed 4 tests

Checking browser requirements for Domain Mapping System | Manage Multiple Domains in a Single WordPress Site
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6114.27 ▼0.081.64 ▼0.0527.75 ▼13.10
Dashboard /wp-admin2,225 ▲445.51 ▼0.20101.80 ▼10.0545.77 ▲3.00
Posts /wp-admin/edit.php2,134 ▲342.03 ▲0.0239.28 ▼5.9938.11 ▲0.71
Add New Post /wp-admin/post-new.php1,543 ▲1722.76 ▼0.18601.40 ▲16.2456.35 ▲5.49
Media Library /wp-admin/upload.php1,436 ▲364.17 ▼0.0196.42 ▲2.0347.75 ▲7.07
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,0881.6625.7528.28

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/domain-mapping-system/vendor/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • Zombie tables detected upon uninstall: 2 tables
    • wp_dms_mapping_values
    • wp_dms_mappings
  • Zombie WordPress options detected upon uninstall: 14 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • fs_active_plugins
    • fs_debug_mode
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • dms_use_categories
    • theysaidso_admin_options
    • dms_version
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means 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
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/domain-mapping-system/sunrise.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Abstract_Seo' not found in wp-content/plugins/domain-mapping-system/includes/seo/yoast/dms-seo-yoast.class.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/domain-mapping-system/assets/js/localizations/js-translations.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'DMS_Platform' not found in wp-content/plugins/domain-mapping-system/includes/platforms/dms-platform-wpcs.class.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 32 tag instead of maximum 10
You can take inspiration from this readme.txt

domain-mapping-system/dms.php 92% from 13 tests

"Domain Mapping System | Manage Multiple Domains in a Single WordPress Site" version 1.9.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("domain-mapping-system.php" instead of "dms.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin51,262 lines of code in 187 files:
LanguageFilesBlank linesComment linesLines of code
PHP1328,76119,63938,863
JSON2005,032
Sass540512,517
PO File135591,0401,835
CSS18301,419
JavaScript862193910
SVG902686

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity87.85
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.52
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes60
▷ Abstract classes46.67%
▷ Concrete classes5693.33%
▷ Final classes00.00%
Methods1,507
▷ Static methods27818.45%
▷ Public methods1,09072.33%
▷ Protected methods171.13%
▷ Private methods40026.54%
Functions113
▷ Named functions10391.15%
▷ Anonymous functions108.85%
Constants150
▷ Global constants9865.33%
▷ Class constants5234.67%
▷ Public constants52100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
12 PNG files occupy 0.11MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/freemius/includes/freemius-pricing/f3aac72a8e63997d6bb888f816457e9b.png5.90KB3.16KB▼ 46.47%
vendor/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
vendor/freemius/includes/freemius-pricing/4375c4a3ddc6f637c2ab9a2d7220f91e.png9.16KB5.26KB▼ 42.58%
vendor/freemius/includes/freemius-pricing/fde48e4609a6ddc11d639fc2421f2afd.png10.97KB5.78KB▼ 47.37%
vendor/freemius/includes/freemius-pricing/5480ed23b199531a8cbc05924f26952b.png7.09KB2.94KB▼ 58.58%