78% direct-admin-reseller-connection

Code Review | Direct Admin Reseller Connection

WordPress plugin Direct Admin Reseller Connection scored78%from 54 tests.

About plugin

  • Plugin page: direct-admin-rese...
  • Plugin version: 0.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.6
  • WordPress version: 6.3.1
  • First release: Aug 21, 2014
  • Latest release: Mar 24, 2019
  • Number of updates: 284
  • Update frequency: every 5.9 days
  • Top authors: vlijmen (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /2,588 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.35ms] Passed 4 tests

An overview of server-side resources used by Direct Admin Reseller Connection
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.94 ▼8.66
Dashboard /wp-admin3.32 ▼0.0251.78 ▼10.99
Posts /wp-admin/edit.php3.37 ▲0.0250.02 ▼1.86
Add New Post /wp-admin/post-new.php5.90 ▲0.0296.27 ▲5.05
Media Library /wp-admin/upload.php3.24 ▲0.0234.29 ▲0.11
Direct Admin Settings /wp-admin/options-general.php?page=darc-nh3.1934.16

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
darc_nh_version
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Direct Admin Reseller Connection
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,926 ▲16513.55 ▼0.688.76 ▲6.8640.13 ▼2.20
Dashboard /wp-admin2,225 ▲195.86 ▼0.0299.88 ▼2.9440.28 ▲0.25
Posts /wp-admin/edit.php2,104 ▲12.01 ▲0.0140.24 ▲3.7836.68 ▲3.18
Add New Post /wp-admin/post-new.php1,557 ▲2618.40 ▼4.65616.43 ▼18.4254.34 ▲3.11
Media Library /wp-admin/upload.php1,404 ▲44.21 ▼0.0293.85 ▼13.6643.35 ▼2.85
Direct Admin Settings /wp-admin/options-general.php?page=darc-nh7121.168.4821.81

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 successfully, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • darc_nh_version
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=darc-nh
    • > Error in wp-admin/includes/template.php+1801
    Uncaught ArgumentCountError: Too few arguments to function do_settings_fields(), 1 passed in wp-content/plugins/direct-admin-reseller-connection/direct-admin-reseller-connection.php on line 79 and exactly 2 expected in wp-admin/includes/template.php:1801
    Stack trace:
    #0 wp-content/plugins/direct-admin-reseller-connection/direct-admin-reseller-connection.php(79): do_settings_fields()
    #1 wp-includes/class-wp-hook.php(310): plugin_options_darc_nh()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #6 {main}
    thrown

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 take a closer look at the following
  • 8× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/direct-admin-reseller-connection/darc-packages.php
    • > /wp-content/plugins/direct-admin-reseller-connection/darc-dashboard.php
    • > /wp-content/plugins/direct-admin-reseller-connection/darc-functions.php
    • > /wp-content/plugins/direct-admin-reseller-connection/darc-domain.php
    • > /wp-content/plugins/direct-admin-reseller-connection/direct-admin-reseller-connection.php
    • > /wp-content/plugins/direct-admin-reseller-connection/darc-widget.php
    • > /wp-content/plugins/direct-admin-reseller-connection/darc-socket.php
    • > /wp-content/plugins/direct-admin-reseller-connection/darc-mail.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 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === direct-admin-reseller-connection === )
You can take inspiration from this readme.txt

direct-admin-reseller-connection/direct-admin-reseller-connection.php Passed 13 tests

"Direct Admin Reseller Connection" version 0.3.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
131 characters long description:
Direct Admin Reseller Connection let's your users manage their Direct Admin account with their Wordpress website profile and login.

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
Good job! No executable or dangerous file extensions detected1,300 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP82112571,006
PO File1152229294

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity48.00
▷ Minimum class complexity48.00
▷ Maximum class complexity48.00
Average method complexity4.13
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions41
▷ Named functions41100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin