10% ddns-4-admin

Code Review | DDNS 4 Admin

WordPress plugin DDNS 4 Admin scored 10% from 54 tests.

About plugin

  • Plugin page: ddns-4-admin
  • Plugin version: 2.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.1
  • WordPress version: 5.8.1
  • First release: Feb 28, 2019
  • Latest release: Mar 3, 2019
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: ddur (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 441 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/ddns-4-admin/classes/abstract/Plugin/v1/class-lib.php+60
    implode(): Passing glue string after array is deprecated. Swap the parameters

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

An overview of server-side resources used by DDNS 4 Admin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1230.88 ▲9.14
Dashboard /wp-admin3.06 ▲0.0050.00 ▲5.00
Posts /wp-admin/edit.php3.11 ▲0.0047.08 ▲3.33
Add New Post /wp-admin/post-new.php5.42 ▼0.0289.25 ▼579.68
Media Library /wp-admin/upload.php3.00 ▲0.0034.74 ▼1.47

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 42 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by DDNS 4 Admin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.92 ▲0.238.18 ▼1.6452.51 ▼0.47
Dashboard /wp-admin2,970 ▲366.06 ▲0.14142.85 ▲0.43110.41 ▼17.36
Posts /wp-admin/edit.php2,739 ▼02.69 ▲0.0068.73 ▼0.1991.55 ▼9.32
Add New Post /wp-admin/post-new.php1,615 ▼6821.29 ▲2.80295.76 ▼116.92111.93 ▼3.29
Media Library /wp-admin/upload.php1,810 ▲35.00 ▲0.00167.70 ▲6.66122.58 ▼0.70

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests 75% 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 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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ddns-4-admin/docs/copyright-notice.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (**DDNS-4-Admin Plugin** - Settings) image required
Please take inspiration from this readme.txt

ddns-4-admin/index.php 92% from 13 tests

The main PHP script in "DDNS 4 Admin" version 2.0.1 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ddns-4-admin.php" instead of "index.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin6,013 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP158691,7283,891
JavaScript5138691,541
CSS510292581

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
These items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 110)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity106.00
▷ Minimum class complexity11.00
▷ Maximum class complexity644.00
Average method complexity5.72
▷ Minimum method complexity1.00
▷ Maximum method complexity110.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes9
▷ Abstract classes555.56%
▷ Concrete classes444.44%
▷ Final classes4100.00%
Methods197
▷ Static methods7839.59%
▷ Public methods14171.57%
▷ Protected methods3819.29%
▷ Private methods189.14%
Functions8
▷ Named functions675.00%
▷ Anonymous functions225.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 compressed PNG files occupy 0.01MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
classes/abstract/Plugin/v1/assets/chosen/chosen-sprite@2x.png0.72KB0.83KB0.00%
assets/ddns-4-admin-logo.png8.75KB7.44KB▼ 15.01%
classes/abstract/Plugin/v1/assets/chosen/chosen-sprite.png0.53KB0.88KB0.00%