89% dcdn-engine

Code Review | DCDN Engine - WordPress DCDN Plugin

WordPress plugin DCDN Engine - WordPress DCDN Plugin scored89%from 54 tests.

About plugin

  • Plugin page: dcdn-engine
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8.2
  • WordPress version: 6.3.1
  • First release: Nov 23, 2021
  • Latest release: Nov 23, 2021
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: daqnext (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /352 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.38ms] Passed 4 tests

A check of server-side resources used by DCDN Engine - WordPress DCDN Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0739.38 ▼4.59
Dashboard /wp-admin3.38 ▲0.0352.19 ▼9.41
Posts /wp-admin/edit.php3.50 ▲0.1448.49 ▲0.68
Add New Post /wp-admin/post-new.php5.98 ▲0.0989.72 ▼4.21
Media Library /wp-admin/upload.php3.31 ▲0.0737.30 ▲3.18
DCDN Engine /wp-admin/options-general.php?page=dcdn_engine3.2733.86

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
dcdn_engine
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by DCDN Engine - WordPress DCDN Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲8614.47 ▲0.331.73 ▼0.5641.67 ▼10.51
Dashboard /wp-admin2,220 ▲324.84 ▼0.04106.14 ▼9.8139.98 ▼4.86
Posts /wp-admin/edit.php2,103 ▲142.01 ▼0.0441.94 ▲7.6534.06 ▼3.02
Add New Post /wp-admin/post-new.php1,554 ▲2117.97 ▼5.24654.33 ▼17.2370.34 ▲11.33
Media Library /wp-admin/upload.php1,405 ▲144.21 ▲0.0495.70 ▼3.0543.29 ▼0.86
DCDN Engine /wp-admin/options-general.php?page=dcdn_engine9392.3136.5636.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (CDN Enabler settings page)
The official readme.txt is a good inspiration

dcdn-engine/dcdn_engine.php 92% from 13 tests

The main file in "DCDN Engine - WordPress DCDN Plugin" v. 0.0.1 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: Name the main plugin file the same as the plugin slug ("dcdn-engine.php" instead of "dcdn_engine.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected541 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP4154251541

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity16.33
▷ Minimum class complexity3.00
▷ Maximum class complexity27.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods23
▷ Static methods1669.57%
▷ Public methods1982.61%
▷ Protected methods417.39%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG images were found in this plugin