74% virkut-related-category-post

Code Review | Virkut Related Category Post

WordPress plugin Virkut Related Category Post scored 74% from 54 tests.

About plugin

  • Plugin page: virkut-related-ca...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.1
  • WordPress version: 6.3.1
  • First release: Apr 14, 2016
  • Latest release: Apr 14, 2016
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: hasancse016 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 587 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼1.96MB] [CPU: ▼51.85ms] Passed 4 tests

Analyzing server-side resources used by Virkut Related Category Post
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.19 ▼33.64
Dashboard /wp-admin2.05 ▼1.265.43 ▼41.10
Posts /wp-admin/edit.php2.05 ▼1.315.78 ▼42.07
Add New Post /wp-admin/post-new.php2.05 ▼3.845.12 ▼90.57
Media Library /wp-admin/upload.php2.05 ▼1.185.60 ▼26.64

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Virkut Related Category Post
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.79 ▼0.511.91 ▲0.3143.99 ▲6.24
Dashboard /wp-admin2,207 ▲585.83 ▲0.2098.23 ▼11.3838.43 ▼9.82
Posts /wp-admin/edit.php2,090 ▲12.06 ▲0.0538.90 ▲2.7936.26 ▲3.47
Add New Post /wp-admin/post-new.php1,960 ▲42423.27 ▲0.03674.76 ▲0.0848.24 ▼10.58
Media Library /wp-admin/upload.php1,392 ▲44.27 ▲0.0594.98 ▼5.7245.32 ▲0.83

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the gird_boot_css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 117× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant VP_NAMESPACE - assumed 'VP_NAMESPACE' (this will throw an Error in a future version of PHP) in wp-content/plugins/virkut-related-category-post/framework/autoload.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Util_Text' not found in wp-content/plugins/virkut-related-category-post/framework/views/control/template_control_head.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Control_Field' not found in wp-content/plugins/virkut-related-category-post/framework/classes/control/field/color.php:3
    • > PHP Warning
      Use of undefined constant VP_PUBLIC_URL - assumed 'VP_PUBLIC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/virkut-related-category-post/framework/config/dependencies.php on line 83
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Control_Field' not found in wp-content/plugins/virkut-related-category-post/framework/classes/control/field/codeeditor.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'VP_View' not found in wp-content/plugins/virkut-related-category-post/framework/views/control/radiobutton.php:1
    • > PHP Notice
      Undefined variable: type in wp-content/plugins/virkut-related-category-post/framework/views/control/html.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/virkut-related-category-post/admin/metabox/main.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Util_Text' not found in wp-content/plugins/virkut-related-category-post/framework/views/option/section.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Control_Field' not found in wp-content/plugins/virkut-related-category-post/framework/classes/control/field/textarea.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: html5, plugin, css3 animation, responsive, post related...

virkut-related-category-post/virkut-related-category-post.php 92% from 13 tests

The primary PHP file in "Virkut Related Category Post" version 1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 154 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin18,035 lines of code in 162 files:
LanguageFilesBlank linesComment linesLines of code
PHP922,0882,3188,962
JavaScript501,0294974,561
CSS171591814,035
SVG100414
Markdown119062
JSON1001

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 102)
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity21.38
▷ Minimum class complexity1.00
▷ Maximum class complexity271.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity102.00
Code structure
Namespaces0
Interfaces2
Traits0
Classes56
▷ Abstract classes47.14%
▷ Concrete classes5292.86%
▷ Final classes00.00%
Methods505
▷ Static methods8917.62%
▷ Public methods47293.47%
▷ Protected methods193.76%
▷ Private methods142.77%
Functions30
▷ Named functions30100.00%
▷ Anonymous functions00.00%
Constants40
▷ Global constants3792.50%
▷ Class constants37.50%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
23 PNG files occupy 0.06MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/hover-shortcode.png2.73KB2.04KB▼ 25.26%
framework/public/css/vendor/jqueryui/themes/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
framework/public/css/vendor/jqueryui/themes/smoothness/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
framework/public/css/vendor/jqueryui/themes/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
framework/public/img/vp-sprite.png12.79KB4.90KB▼ 61.71%