78% details-king-pro

Code Review | Details King Pro

WordPress plugin Details King Pro scored 78% from 54 tests.

About plugin

  • Plugin page: details-king-pro
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.7.1
  • WordPress version: 5.8.1
  • First release: Nov 22, 2013
  • Latest release: Nov 22, 2013
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: ashdurham (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 879 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼146.34ms] Passed 4 tests

Analyzing server-side resources used by Details King Pro
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0246.34 ▲6.95
Dashboard /wp-admin3.09 ▲0.0344.45 ▼5.53
Posts /wp-admin/edit.php3.14 ▲0.0341.71 ▼5.03
Add New Post /wp-admin/post-new.php5.45 ▲0.0193.03 ▼569.81
Media Library /wp-admin/upload.php3.03 ▲0.0332.99 ▼5.00
King Pro Plugins /wp-admin/admin.php?page=kpp_menu3.0233.33
Details King Pro /wp-admin/admin.php?page=detailskingpro3.1035.54

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 3 new options
New WordPress options
dkp_db_version
dkp_option_settings
dkp_output_fields

Browser metrics Passed 4 tests

This is an overview of browser requirements for Details King Pro
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,713 ▲11715.85 ▲0.369.78 ▲0.8551.33 ▲0.52
Dashboard /wp-admin3,007 ▲765.87 ▼0.11145.20 ▼3.19113.73 ▼12.73
Posts /wp-admin/edit.php2,773 ▲342.70 ▲0.0270.43 ▼1.9793.85 ▲0.40
Add New Post /wp-admin/post-new.php1,694 ▲1119.13 ▲1.02392.61 ▲1.52109.97 ▼6.73
Media Library /wp-admin/upload.php1,841 ▲345.00 ▼0.03151.36 ▼7.26136.26 ▲8.22
King Pro Plugins /wp-admin/admin.php?page=kpp_menu1,2562.0954.3369.38
Details King Pro /wp-admin/admin.php?page=detailskingpro1,6603.7792.61101.36

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 3 options
    • dkp_option_settings
    • dkp_output_fields
    • dkp_db_version

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=detailskingpro
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/admin.php?page=detailskingpro
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=detailskingpro
    • > Warning in wp-content/plugins/details-king-pro/includes/screens/settings.php+133
    Invalid argument supplied for foreach()

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
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/details-king-pro/includes/screens/kpp.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/details-king-pro/includes/output.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/details-king-pro/includes/screens/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/details-king-pro/includes/admin_area.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/details-king-pro/details-king-pro.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
7 plugin tags: date, site details, settings, file upload, global values...

details-king-pro/details-king-pro.php 92% from 13 tests

Analyzing the main PHP file in "Details King Pro" version 1.0
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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,796 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS37646976
SVG100399
PHP56328351
JavaScript17270

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
5 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/cross.png0.67KB0.64KB▼ 4.93%
images/kpp-icon_16x16_sat.png1.71KB0.72KB▼ 57.78%
images/kpp-icon_32x32.png2.99KB1.51KB▼ 49.48%
images/kpp-icon_16x16.png1.69KB0.72KB▼ 57.53%
images/kpp-icon_32x32_sat.png3.09KB1.53KB▼ 50.38%