78% digitimber-cpanel-integration

Code Review | DigiTimber cPanel Integration

WordPress plugin DigiTimber cPanel Integration scored78%from 54 tests.

About plugin

  • Plugin page: digitimber-cpanel...
  • Plugin version: 1.4.6
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Dec 10, 2019
  • Latest release: Apr 25, 2022
  • Number of updates: 16
  • Update frequency: every 54.2 days
  • Top authors: digitimber (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /4,036 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼5.99ms] Passed 4 tests

An overview of server-side resources used by DigiTimber cPanel Integration
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.32 ▼0.32
Dashboard /wp-admin3.32 ▼0.0352.32 ▼10.92
Posts /wp-admin/edit.php3.37 ▲0.0147.69 ▼2.45
Add New Post /wp-admin/post-new.php5.90 ▲0.0195.74 ▼7.96
Media Library /wp-admin/upload.php3.24 ▲0.0134.87 ▼2.62
cPanel Integration /wp-admin/admin.php?page=dt-top-level-handle3.1832.63
Email Administration /wp-admin/admin.php?page=dt-cpanel-email3.1831.74
cPanel Settings /wp-admin/options-general.php?page=dt-cpanel-settings-page3.1831.40
Settings /wp-admin/admin.php?page=dt-cpanel-settings-page3.1833.96

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
dt_cpanel_key
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for DigiTimber cPanel Integration
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,875 ▲10414.67 ▼0.081.99 ▲0.1040.82 ▼3.60
Dashboard /wp-admin2,253 ▲475.84 ▲0.98102.04 ▼2.1139.49 ▼4.04
Posts /wp-admin/edit.php2,135 ▲351.98 ▼0.0540.19 ▲1.3835.09 ▲0.97
Add New Post /wp-admin/post-new.php1,573 ▲2823.36 ▲0.31612.20 ▼35.1156.69 ▼3.26
Media Library /wp-admin/upload.php1,438 ▲414.37 ▲0.2596.70 ▼6.2847.20 ▲0.10
cPanel Integration /wp-admin/admin.php?page=dt-top-level-handle8172.0324.1425.69
Email Administration /wp-admin/admin.php?page=dt-cpanel-email8082.0624.6126.09
cPanel Settings /wp-admin/options-general.php?page=dt-cpanel-settings-page8352.0325.5427.98
Settings /wp-admin/admin.php?page=dt-cpanel-settings-page8352.0624.7325.04

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dt-cpanel-settings-page
    • > Notice in wp-content/plugins/digitimber-cpanel-integration/digitimber-cpanel.php+488
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/admin.php?page=dt-cpanel-email
    • > Warning in wp-content/plugins/digitimber-cpanel-integration/digitimber-cpanel.php+392
    sizeof(): Parameter must be an array or an object that implements Countable
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dt-cpanel-settings-page
    • > Notice in wp-content/plugins/digitimber-cpanel-integration/digitimber-cpanel.php+516
    Undefined variable: cpun_value
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dt-cpanel-settings-page
    • > Notice in wp-content/plugins/digitimber-cpanel-integration/digitimber-cpanel.php+517
    Undefined variable: cppw_value

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/digitimber-cpanel-integration/digitimber-cpanel.php:21

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: manage, email, cpanel, mail

digitimber-cpanel-integration/digitimber-cpanel.php 85% from 13 tests

The main file in "DigiTimber cPanel Integration" v. 1.4.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("digitimber-cpanel-integration.php" instead of "digitimber-cpanel.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 191 characters long)

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 plugin442 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP273103442

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods466.67%
▷ Protected methods233.33%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin