77% dk-white-label

Code Review | DK White Label

WordPress plugin DK White Label scored77%from 54 tests.

About plugin

  • Plugin page: dk-white-label
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.5.3
  • WordPress version: 6.3.1
  • First release: Aug 16, 2016
  • Latest release: Aug 12, 2016
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: dinamiko (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,499 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.03MB] [CPU: ▼11.96ms] Passed 4 tests

Server-side resources used by DK White Label
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.21 ▼1.28
Dashboard /wp-admin3.35 ▲0.0436.28 ▼13.45
Posts /wp-admin/edit.php3.41 ▲0.0536.70 ▼10.14
Add New Post /wp-admin/post-new.php5.59 ▼0.2972.80 ▼22.96
Media Library /wp-admin/upload.php3.35 ▲0.1232.31 ▲0.77
DK White Label /wp-admin/options-general.php?page=dkwl_settings3.3542.32

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

DK White Label: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,935 ▲20013.93 ▼0.455.81 ▲4.0342.56 ▲1.12
Dashboard /wp-admin2,233 ▲425.25 ▲0.36104.92 ▼9.1142.38 ▼0.21
Posts /wp-admin/edit.php2,118 ▲292.32 ▲0.3339.08 ▲3.1031.40 ▲0.30
Add New Post /wp-admin/post-new.php1,535 ▲123.38 ▲0.20667.57 ▼2.8638.65 ▼13.20
Media Library /wp-admin/upload.php1,412 ▲274.46 ▲0.2997.27 ▼5.9841.34 ▼2.56
DK White Label /wp-admin/options-general.php?page=dkwl_settings1,1603.8668.2028.02

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=dkwl_settings
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.

SRP 50% from 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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dk-white-label/includes/dk-white-label-custom-color-scheme.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: There are too many tags (17 tag instead of maximum 10)
  • Screenshots: These screenshots require images: #1 (Login Screen), #2 (UI Elements), #3 (Color Scheme)
The official readme.txt is a good inspiration

dk-white-label/dk-white-label.php 77% from 13 tests

Analyzing the main PHP file in "DK White Label" version 1.0
The following require your attention:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.9.6" instead of "3.9")
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected1,063 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP63043171,009
JavaScript1201253
CSS1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity31.33
▷ Minimum class complexity8.00
▷ Maximum class complexity63.00
Average method complexity4.64
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods25
▷ Static methods28.00%
▷ Public methods2288.00%
▷ Protected methods00.00%
▷ Private methods312.00%
Functions20
▷ Named functions20100.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
PNG images were not found in this plugin