10% voight-kampff-comment-test

Code Review | Voight Kampff Comment Test

WordPress plugin Voight Kampff Comment Test scored10%from 54 tests.

About plugin

  • Plugin page: voight-kampff-com...
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: Mar 22, 2013
  • Latest release: Mar 24, 2013
  • Number of updates: 3
  • Update frequency: every 3.7 days
  • Top authors: jjmartucci (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /934 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/voight-kampff-comment-test/vkcomments.php+241
    Non-static method vkctRun::admin() should not be called statically

Server metrics [RAM: ▼1.85MB] [CPU: ▼53.05ms] Passed 4 tests

An overview of server-side resources used by Voight Kampff Comment Test
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.13 ▼1.334.73 ▼35.48
Dashboard /wp-admin2.15 ▼1.155.43 ▼50.47
Posts /wp-admin/edit.php2.15 ▼1.206.32 ▼40.82
Add New Post /wp-admin/post-new.php2.15 ▼3.736.16 ▼85.43
Media Library /wp-admin/upload.php2.15 ▼1.086.17 ▼34.91
Voight-Kampff Comment Test /wp-admin/plugins.php?page=vkct-settings2.165.72

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
vkct-questions
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
vkct-options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Voight Kampff Comment Test
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.72 ▲0.352.09 ▼0.2940.56 ▼5.26
Dashboard /wp-admin2,199 ▲225.62 ▲0.0595.56 ▼8.7038.89 ▼11.57
Posts /wp-admin/edit.php2,104 ▲42.00 ▼0.0240.00 ▼0.2835.73 ▼2.03
Add New Post /wp-admin/post-new.php1,533 ▲723.09 ▲0.07643.85 ▼26.7267.47 ▲5.07
Media Library /wp-admin/upload.php1,401 ▲14.27 ▲0.06102.07 ▼7.2747.09 ▼2.20
Voight-Kampff Comment Test /wp-admin/plugins.php?page=vkct-settings9432.1329.7029.57

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/voight-kampff-comment-test/vkcomments.php+241
    Non-static method vkctRun::admin() should not be called statically
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

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)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/plugins.php?page=vkct-settings
    • > Deprecated in wp-content/plugins/voight-kampff-comment-test/vkcomments.php+241
    Non-static method vkctRun::admin() should not be called statically
    • > GET request to /wp-admin/plugins.php?page=vkct-settings
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method vkctSettings::option_setup() should not be called statically
    • > GET request to /wp-admin/plugins.php?page=vkct-settings
    • > Deprecated in wp-content/plugins/voight-kampff-comment-test/admin.php+212
    Non-static method vkctSettings::default_options() should not be called statically
    • > GET request to /wp-admin/plugins.php?page=vkct-settings
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method vkctSettings::admin_pages() should not be called statically
    • > GET request to /wp-admin/plugins.php?page=vkct-settings
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method vkctSettings::register_settings() should not be called statically
    • > GET request to /wp-admin/plugins.php?page=vkct-settings
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method vkctSettings::options_page() should not be called statically
    • > GET request to /wp-admin/plugins.php?page=vkct-settings
    • > Deprecated in wp-admin/includes/template.php+1771
    Non-static method vkctSettings::general_settings() should not be called statically
    • > GET request to /wp-admin/plugins.php?page=vkct-settings
    • > Deprecated in wp-admin/includes/template.php+1824
    Non-static method vkctSettings::field_gen() should not be called statically
    • > GET request to /wp-admin/plugins.php?page=vkct-settings
    • > Deprecated in wp-admin/includes/template.php+1824
    Non-static method vkctSettings::field_display() should not be called statically
    • > GET request to /wp-admin/plugins.php?page=vkct-settings
    • > Deprecated in wp-content/plugins/voight-kampff-comment-test/admin.php+125
    Non-static method vkctSettings::display_options() should not be called statically
    • > GET request to /wp-admin/plugins.php?page=vkct-settings
    • > Deprecated in wp-admin/includes/template.php+1824
    Non-static method vkctSettings::field_question() should not be called statically
    • > GET request to /wp-admin/plugins.php?page=vkct-settings
    • > Deprecated in wp-admin/includes/template.php+1824
    Non-static method vkctSettings::field_answer() should not be called statically
    • > GET request to /wp-admin/plugins.php?page=vkct-settings
    • > Deprecated in wp-admin/includes/template.php+1771
    Non-static method vkctSettings::global_settings() should not be called statically
    • > GET request to /wp-admin/plugins.php?page=vkct-settings
    • > Deprecated in wp-admin/includes/template.php+1824
    Non-static method vkctSettings::field_use_default() should not be called statically
    • > GET request to /wp-admin/plugins.php?page=vkct-settings
    • > Deprecated in wp-admin/includes/template.php+1824
    Non-static method vkctSettings::field_logged_in() should not be called statically
    • > GET request to /wp-admin/plugins.php?page=vkct-settings
    • > Deprecated in wp-content/plugins/voight-kampff-comment-test/admin.php+111
    Non-static method vkctSettings::logged_in_options() should not be called statically
    • > GET request to /wp-admin/plugins.php?page=vkct-settings
    • > Deprecated in wp-admin/includes/template.php+1824
    Non-static method vkctSettings::field_req_text() should not be called statically
    • > GET request to /wp-admin/plugins.php?page=vkct-settings
    • > Deprecated in wp-admin/includes/template.php+1824
    Non-static method vkctSettings::field_qa_display() should not be called statically

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/voight-kampff-comment-test/vkcomments.php:142

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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 require attention:
  • Screenshots: Please add an image for screenshot #1 (Example of fields added using the VKCT plugin.)
The official readme.txt is a good inspiration

voight-kampff-comment-test/vkcomments.php 85% from 13 tests

Analyzing the main PHP file in "Voight Kampff Comment Test" version 0.1.1
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("voight-kampff-comment-test.php" instead of "vkcomments.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 304 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin421 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP311419421

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity24.00
▷ Minimum class complexity17.00
▷ Maximum class complexity35.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected