78% related-king-pro

Code Review | Related King Pro

WordPress plugin Related King Pro scored78%from 54 tests.

About plugin

  • Plugin page: related-king-pro
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.7.1
  • WordPress version: 6.3.1
  • First release: Sep 16, 2013
  • Latest release: Nov 27, 2013
  • Number of updates: 12
  • Update frequency: every 6.1 days
  • Top authors: ashdurham (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,682 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
Install script ran successfully

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

This is a short check of server-side resources used by Related King Pro
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.80 ▼2.22
Dashboard /wp-admin3.38 ▲0.0743.28 ▼1.11
Posts /wp-admin/edit.php3.43 ▲0.0748.61 ▼2.14
Add New Post /wp-admin/post-new.php5.96 ▲0.0795.37 ▼4.03
Media Library /wp-admin/upload.php3.30 ▲0.0738.36 ▲3.79
King Pro Plugins /wp-admin/admin.php?page=kpp_menu3.2832.09
Related King Pro /wp-admin/admin.php?page=relatedkingpro3.2730.26

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 28 new files
Database: no new tables, 8 new options
New WordPress options
widget_relatedkingpro_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
relpk_db_version
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Related King Pro
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲7513.21 ▼1.191.74 ▼0.9243.18 ▼6.53
Dashboard /wp-admin2,233 ▲455.85 ▼0.01109.03 ▲7.3937.42 ▼8.35
Posts /wp-admin/edit.php2,122 ▲332.00 ▲0.0140.24 ▼4.9536.28 ▼0.92
Add New Post /wp-admin/post-new.php1,558 ▲4423.24 ▲5.82645.79 ▼5.9459.11 ▲4.80
Media Library /wp-admin/upload.php1,421 ▲394.19 ▼0.0299.33 ▲0.9442.13 ▼3.63
King Pro Plugins /wp-admin/admin.php?page=kpp_menu9492.0426.3135.43
Related King Pro /wp-admin/admin.php?page=relatedkingpro9192.0823.7839.19

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-comments
    • widget_relatedkingpro_widget
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • relpk_db_version
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=relatedkingpro
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/admin.php?page=relatedkingpro
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 7× 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/related-king-pro/includes/admin_area.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/related-king-pro/includes/output.php:69
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/related-king-pro/includes/screens/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/related-king-pro/includes/widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/related-king-pro/includes/functions.php:64
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/related-king-pro/includes/screens/kpp.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/related-king-pro/relatedkingpro.php:42

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can take inspiration from this readme.txt

related-king-pro/relatedkingpro.php 92% from 13 tests

The entry point to "Related King Pro" version 1.0.5 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("related-king-pro.php" instead of "relatedkingpro.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin1,398 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS3282574
PHP77638425
SVG100399

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity5.50
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/kpp-icon_16x16.png1.69KB0.72KB▼ 57.53%
images/kpp-icon_32x32.png2.99KB1.51KB▼ 49.48%
images/relkp-icon_32x32.png1.92KB1.52KB▼ 20.85%
images/relkp-icon_16x16.png1.39KB0.68KB▼ 51.37%
images/kpp-icon_32x32_sat.png3.09KB1.53KB▼ 50.38%