10% ht-request

Code Review | WP Request

WordPress plugin WP Request scored10%from 54 tests.

About plugin

  • Plugin page: ht-request
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.1.1
  • WordPress version: 6.3.1
  • First release: Apr 9, 2019
  • Latest release: Apr 10, 2019
  • Number of updates: 4
  • Update frequency: every 1.0 days
  • Top authors: hashtagerrors (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /508 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/ht-request/includes/class-wph-request-service.php+42
    Cannot use "parent" when current class scope has no parent

Server metrics [RAM: ▼1.76MB] [CPU: ▼53.64ms] Passed 4 tests

An overview of server-side resources used by WP Request
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.23 ▼1.235.23 ▼37.79
Dashboard /wp-admin2.25 ▼1.057.15 ▼44.04
Posts /wp-admin/edit.php2.25 ▼1.116.11 ▼37.32
Add New Post /wp-admin/post-new.php2.25 ▼3.646.76 ▼95.39
Media Library /wp-admin/upload.php2.25 ▼0.985.39 ▼25.08

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WP Request
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲14113.96 ▼0.794.68 ▲2.8540.57 ▼4.81
Dashboard /wp-admin2,210 ▲195.85 ▲0.95100.19 ▼4.1539.96 ▲3.79
Posts /wp-admin/edit.php2,093 ▲42.02 ▼0.0034.48 ▼8.3433.82 ▼1.76
Add New Post /wp-admin/post-new.php1,532 ▲423.33 ▲5.21689.28 ▲68.9066.15 ▲11.90
Media Library /wp-admin/upload.php1,392 ▲44.22 ▲0.0396.42 ▲1.4641.66 ▼1.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/ht-request/includes/class-wph-request-service.php+42
    Cannot use "parent" when current class scope has no parent
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/ht-request/public/partials/wph-request-public-display.php
    • > /wp-content/plugins/ht-request/admin/partials/wph-request-admin-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/ht-request/shortcodes/wph-request-variables.php:328

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

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 28 tag instead of maximum 10
Please take inspiration from this readme.txt

ht-request/wp-request.php 85% from 13 tests

The primary PHP file in "WP Request" version 1.0.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("ht-request.php" instead of "wp-request.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected1,018 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP142589531,012
JavaScript24546
CSS2080

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity21.33
▷ Minimum class complexity1.00
▷ Maximum class complexity179.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods117
▷ Static methods3731.62%
▷ Public methods10690.60%
▷ Protected methods54.27%
▷ Private methods65.13%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin