68% domainer

Code Review | Domainer

WordPress plugin Domainer scored68%from 54 tests.

About plugin

  • Plugin page: domainer
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4.2
  • WordPress version: 6.3.1
  • First release: Apr 28, 2017
  • Latest release: Jul 12, 2020
  • Number of updates: 20
  • Update frequency: every 58.6 days
  • Top authors: dougwollison (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

10+ active /3,740 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.08MB] [CPU: ▼6.18ms] Passed 4 tests

A check of server-side resources used by Domainer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.0850.02 ▼10.23
Dashboard /wp-admin3.42 ▲0.0946.21 ▼7.01
Posts /wp-admin/edit.php3.53 ▲0.1548.81 ▲0.96
Add New Post /wp-admin/post-new.php6.00 ▲0.0883.99 ▼8.45
Media Library /wp-admin/upload.php3.34 ▲0.0838.49 ▲4.07

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

Filesystem and database footprint
No storage issues were detected
Filesystem: no files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Domainer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6114.78 ▲0.402.02 ▼0.4344.01 ▼8.08
Dashboard /wp-admin2,213 ▲225.85 ▼0.03105.41 ▼9.7440.82 ▼1.98
Posts /wp-admin/edit.php2,093 ▲12.00 ▼0.0334.29 ▼0.3236.45 ▲4.06
Add New Post /wp-admin/post-new.php1,549 ▲723.22 ▲4.82681.99 ▲13.5258.38 ▲2.28
Media Library /wp-admin/upload.php1,395 ▲134.24 ▲0.06108.11 ▲10.2547.15 ▲0.24

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Error in wp-content/plugins/domainer/uninstall.php+35
    Uncaught Error: Call to undefined function Domainer\get_sites() in wp-content/plugins/domainer/uninstall.php:35
    Stack trace:
    #0 wp-content/plugins/domainer/uninstall.php(51): Domainer\uninstall()
    #1 wp-admin/includes/plugin.php(1245): include_once('/var/www/wordpr...')
    #2 wp-admin/includes/plugin.php(960): uninstall_plugin()
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/domainer/uninstall.php
  • 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Domainer\\Handler' not found in wp-content/plugins/domainer/includes/class-domainer-system.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Domainer\\Model' not found in wp-content/plugins/domainer/includes/class-domainer-domain.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Domainer\\Handler' not found in wp-content/plugins/domainer/includes/class-domainer-documenter.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Domainer\\Handler' not found in wp-content/plugins/domainer/includes/class-domainer-manager.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Domainer\\Handler' not found in wp-content/plugins/domainer/includes/class-domainer-backend.php:23
    • > PHP Notice
      Trying to get property 'base_prefix' of non-object in wp-content/plugins/domainer/sunrise.php on line 30
    • > PHP Fatal error
      Uncaught Error: Call to undefined method stdClass::get_row() in wp-content/plugins/domainer/sunrise.php:47
    • > PHP Fatal error
      Uncaught Error: Class 'Domainer\\Handler' not found in wp-content/plugins/domainer/includes/class-domainer-installer.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_ssl() in wp-content/plugins/domainer/domainer.php:94
    • > PHP Warning
      Creating default object from empty value in wp-content/plugins/domainer/sunrise.php on line 30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: domain management, multisite, domain mapping

domainer/domainer.php Passed 13 tests

The primary PHP file in "Domainer" version 1.2.1 is used by WordPress to initiate all plugin functionality
50 characters long description:
Domain mapping management for WordPress Multisite.

Code Analysis Passed 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
No dangerous file extensions were detected1,746 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP185481,9471,631
JavaScript1151757
Sass210056
CSS2022

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity22.42
▷ Minimum class complexity1.00
▷ Maximum class complexity60.00
Average method complexity3.47
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes12
▷ Abstract classes216.67%
▷ Concrete classes1083.33%
▷ Final classes10100.00%
Methods104
▷ Static methods9793.27%
▷ Public methods8884.62%
▷ Protected methods00.00%
▷ Private methods1615.38%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants16100.00%
▷ Class constants00.00%
▷ Public constants00.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