72% wphelpful

Code Review | WPHelpful

WordPress plugin WPHelpful scored72%from 54 tests.

About plugin

  • Plugin page: wphelpful
  • Plugin version: 1.2.4
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.3-5.4.0
  • WordPress version: 6.3.1
  • First release: Sep 20, 2019
  • Latest release: Apr 24, 2020
  • Number of updates: 6
  • Update frequency: every 36.2 days
  • Top authors: zackgilbert (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

50+ active /1,442 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.37MB] [CPU: ▼2.09ms] Passed 4 tests

This is a short check of server-side resources used by WPHelpful
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3143.22 ▲1.22
Dashboard /wp-admin3.73 ▲0.4251.45 ▼4.96
Posts /wp-admin/edit.php3.78 ▲0.4252.66 ▼1.38
Add New Post /wp-admin/post-new.php6.27 ▲0.3891.08 ▼3.25
Media Library /wp-admin/upload.php3.59 ▲0.3639.41 ▲5.06
Post Feedback /wp-admin/admin.php?page=wphelpful-posts3.5334.18
General Settings /wp-admin/admin.php?page=wphelpful-settings3.5633.62
WPHelpful /wp-admin/options-general.php?page=wphelpful3.5636.05
Sitewide Feedback /wp-admin/admin.php?page=wphelpful-feedback3.5633.51
User Feedback /wp-admin/admin.php?page=wphelpful-users3.5332.64

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 40 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WPHelpful
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲18613.62 ▼0.739.42 ▲7.2243.74 ▼0.21
Dashboard /wp-admin2,253 ▲825.84 ▲0.2888.90 ▲0.0637.89 ▼2.92
Posts /wp-admin/edit.php2,196 ▲962.30 ▲0.2938.70 ▲3.2736.87 ▲0.17
Add New Post /wp-admin/post-new.php6,288 ▲4,76026.02 ▲2.99898.75 ▲217.1255.78 ▲2.09
Media Library /wp-admin/upload.php1,459 ▲624.56 ▲0.3399.56 ▼15.8842.75 ▼6.45
Post Feedback /wp-admin/admin.php?page=wphelpful-posts6941.516.7414.10
General Settings /wp-admin/admin.php?page=wphelpful-settings1,7142.8829.5669.00
WPHelpful /wp-admin/options-general.php?page=wphelpful1,0422.1129.0429.64
Sitewide Feedback /wp-admin/admin.php?page=wphelpful-feedback8882.0930.5325.33
User Feedback /wp-admin/admin.php?page=wphelpful-users6941.126.5214.08

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 25% 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)
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=wphelpful-posts
    • > Notice in wp-content/plugins/wphelpful/admin/class-wphelpful-admin.php+944
    Undefined index: post_id
    • > GET request to /wp-admin/admin.php?page=wphelpful-users
    • > Notice in wp-content/plugins/wphelpful/admin/class-wphelpful-admin.php+1029
    Undefined index: user_id

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
Almost there! Just fix the following items
  • 7× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wphelpful/public/partials/wphelpful-templates-confirmation.php
    • > /wp-content/plugins/wphelpful/admin/partials/wphelpful-admin-site-feedback.php
    • > /wp-content/plugins/wphelpful/admin/partials/wphelpful-admin-user-feedback-column.php
    • > /wp-content/plugins/wphelpful/admin/partials/wphelpful-admin-post-feedback.php
    • > /wp-content/plugins/wphelpful/admin/partials/wphelpful-admin-user-feedback.php
    • > /wp-content/plugins/wphelpful/admin/partials/wphelpful-admin-post-feedback-column.php
    • > /wp-content/plugins/wphelpful/admin/partials/wphelpful-admin-settings-textarea.php
  • 48× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: text in wp-content/plugins/wphelpful/admin/partials/wphelpful-admin-settings-textarea.php on line 2
    • > PHP Notice
      Undefined variable: post in wp-content/plugins/wphelpful/admin/partials/wphelpful-admin-post-feedback.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wphelpful/admin/partials/wphelpful-admin-settings-input.php:2
    • > PHP Notice
      Undefined variable: post_rating in wp-content/plugins/wphelpful/admin/partials/wphelpful-admin-post-feedback-column.php on line 3
    • > PHP Notice
      Undefined variable: user_feedback in wp-content/plugins/wphelpful/admin/partials/wphelpful-admin-user-feedback.php on line 19
    • > PHP Notice
      Undefined variable: show_feedback in wp-content/plugins/wphelpful/public/partials/wphelpful-templates-stars.php on line 2
    • > PHP Notice
      Undefined variable: name in wp-content/plugins/wphelpful/admin/partials/wphelpful-admin-settings-checkbox.php on line 9
    • > PHP Notice
      Undefined variable: confirmation_text in wp-content/plugins/wphelpful/public/partials/wphelpful-templates-confirmation.php on line 3
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/wphelpful/admin/partials/wphelpful-admin-post-feedback-column.php on line 7
    • > PHP Notice
      Undefined variable: name in wp-content/plugins/wphelpful/admin/partials/wphelpful-admin-settings-input.php on line 2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 20 tag instead of maximum 10
You can take inspiration from this readme.txt

wphelpful/wphelpful.php 92% from 13 tests

"WPHelpful" version 1.2.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin1,720 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP294109181,538
CSS228498
JavaScript2232284

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity20.12
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods84
▷ Static methods22.38%
▷ Public methods7994.05%
▷ Protected methods00.00%
▷ Private methods55.95%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/wph.png8.03KB4.43KB▼ 44.81%