74% pronamic-domain-mapping

Code Review | Pronamic Domain Mapping

WordPress plugin Pronamic Domain Mapping scored74%from 54 tests.

About plugin

  • Plugin page: pronamic-domain-m...
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-6.0
  • WordPress version: 6.3.1
  • First release: Mar 12, 2013
  • Latest release: Jun 7, 2022
  • Number of updates: 24
  • Update frequency: every 140.6 days
  • Top authors: pronamic (54.17%)remcotolsma (50%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /11,300 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼4.48ms] Passed 4 tests

Server-side resources used by Pronamic Domain Mapping
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1440.89 ▼1.26
Dashboard /wp-admin3.48 ▲0.1852.80 ▲0.08
Posts /wp-admin/edit.php3.60 ▲0.2448.25 ▼4.20
Add New Post /wp-admin/post-new.php6.15 ▲0.2686.55 ▼12.53
Media Library /wp-admin/upload.php3.40 ▲0.1839.06 ▲8.15
Domain Name Pages /wp-admin/edit.php?post_type=pronamic_domain_page3.4540.18
Domain Names /wp-admin/edit.php?post_type=pronamic_domain_page&page=pronamic_domain_mapping_names3.3837.87
Add New /wp-admin/post-new.php?post_type=pronamic_domain_page6.1487.74

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 135 new files
Database: 1 new table, 7 new options
New tables
wp_pronamic_domain_posts
New WordPress options
can_compress_scripts
widget_theysaidso_widget
pronamic_domain_mapping_db_version
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Pronamic Domain Mapping: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,874 ▲8813.17 ▼1.214.57 ▲2.2743.10 ▼1.19
Dashboard /wp-admin2,249 ▲465.87 ▲1.0197.34 ▼12.7636.24 ▼3.55
Posts /wp-admin/edit.php2,131 ▲282.02 ▼0.0335.56 ▼2.8433.02 ▼3.25
Add New Post /wp-admin/post-new.php1,571 ▲3923.41 ▲0.26644.34 ▼27.5360.37 ▲1.43
Media Library /wp-admin/upload.php1,434 ▲344.24 ▲0.05102.90 ▼6.5741.61 ▼3.56
Domain Name Pages /wp-admin/edit.php?post_type=pronamic_domain_page1,1701.9431.3431.54
Domain Names /wp-admin/edit.php?post_type=pronamic_domain_page&page=pronamic_domain_mapping_names8202.0325.1927.42
Add New /wp-admin/post-new.php?post_type=pronamic_domain_page1,59916.80823.9140.57

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_pronamic_domain_posts
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • pronamic_domain_mapping_db_version
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 107× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/pronamic-domain-mapping/vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/pronamic-domain-mapping/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/pronamic-domain-mapping/vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/pronamic-domain-mapping/vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/pronamic-domain-mapping/vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/pronamic-domain-mapping/vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/pronamic-domain-mapping/vendor/composer/installers/src/Composer/Installers/AglInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/pronamic-domain-mapping/vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installer\\LibraryInstaller' not found in wp-content/plugins/pronamic-domain-mapping/vendor/composer/installers/src/Composer/Installers/Installer.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/pronamic-domain-mapping/vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php:4

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 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
8 plugin tags: domain, dns, landingpage, page, landingspage...

pronamic-domain-mapping/pronamic-domain-mapping.php 92% from 13 tests

"Pronamic Domain Mapping" version 2.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes

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 plugin10,666 lines of code in 127 files:
LanguageFilesBlank linesComment linesLines of code
JSON4005,907
PHP1216781,1283,205
YAML125801,469
PO File17613585

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity3.33
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes107
▷ Abstract classes10.93%
▷ Concrete classes10699.07%
▷ Final classes00.00%
Methods162
▷ Static methods1911.73%
▷ Public methods11872.84%
▷ Protected methods3420.99%
▷ Private methods106.17%
Functions10
▷ Named functions440.00%
▷ Anonymous functions660.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin