10% qhub-qa

Code Review | Qhub Q&A Wordpress Plugin

WordPress plugin Qhub Q&A Wordpress Plugin scored10%from 54 tests.

About plugin

  • Plugin page: qhub-qa
  • Plugin version: 1.04.96
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.2-4.7.5
  • WordPress version: 6.3.1
  • First release: May 29, 2014
  • Latest release: Dec 18, 2014
  • Number of updates: 6
  • Update frequency: every 183.0 days
  • Top authors: qhub (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,342 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/qhub-qa/qhub.php+109
    Methods with the same name as their class will not be constructors in a future version of PHP; Qhub_Widget has a deprecated constructor

Server metrics [RAM: ▼1.70MB] [CPU: ▼57.47ms] Passed 4 tests

Analyzing server-side resources used by Qhub Q&A Wordpress Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.30 ▼1.165.34 ▼36.48
Dashboard /wp-admin2.32 ▼1.036.22 ▼54.75
Posts /wp-admin/edit.php2.32 ▼1.046.86 ▼42.49
Add New Post /wp-admin/post-new.php2.32 ▼3.575.82 ▼96.16
Media Library /wp-admin/upload.php2.32 ▼0.915.46 ▼29.88
Qhub Plugin Config /wp-admin/options-general.php?page=qhub-qa/qhub.php2.326.69

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 15 new options
New WordPress options
widget_theysaidso_widget
qhub_user_apikey
qhub_default_showby
widget_recent-posts
widget_recent-comments
qhub_default_title_txt
qhub_default_before_question
qhub_default_after_question
qhub_default_showme
theysaidso_admin_options
...

Browser metrics Passed 4 tests

Checking browser requirements for Qhub Q&A Wordpress Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.71 ▲0.321.98 ▲0.3443.48 ▼2.23
Dashboard /wp-admin2,202 ▲225.70 ▲0.0086.82 ▼6.2639.06 ▼6.18
Posts /wp-admin/edit.php2,101 ▲12.01 ▼0.0535.89 ▼6.1534.28 ▼3.35
Add New Post /wp-admin/post-new.php6,325 ▲4,79425.93 ▲2.82934.35 ▲289.1062.84 ▲6.86
Media Library /wp-admin/upload.php1,407 ▲44.40 ▲0.0798.10 ▲0.3242.66 ▼4.57
Qhub Plugin Config /wp-admin/options-general.php?page=qhub-qa/qhub.php9302.0523.1931.95

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 cannot be uninstalled
    • > Deprecated in wp-content/plugins/qhub-qa/qhub.php+109
    Methods with the same name as their class will not be constructors in a future version of PHP; Qhub_Widget has a deprecated constructor
  • This plugin does not fully uninstall, leaving 15 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_qhub-widget
    • qhub_default_api_order
    • qhub_default_title_txt
    • qhub_default_after_question
    • qhub_default_showby
    • can_compress_scripts
    • widget_theysaidso_widget
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=qhub-qa/qhub.php
    • > Deprecated in wp-content/plugins/qhub-qa/qhub.php+109
    Methods with the same name as their class will not be constructors in a future version of PHP; Qhub_Widget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=qhub-qa/qhub.php
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Qhub_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=qhub-qa/qhub.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

SRP 0% 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 take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/qhub-qa/class.qhub.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/qhub-qa/qhub.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: answers, question and answer software, question and answer, questions, questions and answers software...

qhub-qa/qhub.php 92% from 13 tests

The main PHP script in "Qhub Q&A Wordpress Plugin" version 1.04.96 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("qhub-qa.php" instead of "qhub.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected639 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP212886639

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity53.00
▷ Minimum class complexity53.00
▷ Maximum class complexity53.00
Average method complexity14.00
▷ Minimum method complexity1.00
▷ Maximum method complexity36.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%
Functions14
▷ Named functions14100.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
There were not PNG files found in your plugin