10% rk-hreview-for-wp

Code Review | hReview for WordPress

WordPress plugin hReview for WordPress scored10%from 54 tests.

About plugin

  • Plugin page: rk-hreview-for-wp
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5
  • WordPress version: 6.3.1
  • First release: Mar 10, 2013
  • Latest release: Mar 10, 2013
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: robkelly (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,134 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/rk-hreview-for-wp/rk-wp-hreview.php+29
    Methods with the same name as their class will not be constructors in a future version of PHP; RKWPhReview has a deprecated constructor

Server metrics [RAM: ▼0.30MB] [CPU: ▼17.19ms] Passed 4 tests

Analyzing server-side resources used by hReview for WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.45 ▼0.0132.71 ▼8.63
Dashboard /wp-admin3.34 ▲0.0348.79 ▲2.04
Posts /wp-admin/edit.php3.39 ▲0.0345.92 ▼2.40
Add New Post /wp-admin/post-new.php4.63 ▼1.2642.44 ▼59.76
Media Library /wp-admin/upload.php3.26 ▲0.0336.90 ▲2.73
WP hReview /wp-admin/options-general.php?page=rkwpr_options3.2232.59

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
rkwpr_options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by hReview for WordPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲6414.81 ▲0.441.81 ▼0.0238.67 ▼5.62
Dashboard /wp-admin2,206 ▲185.81 ▼0.09109.46 ▼5.7938.23 ▼7.29
Posts /wp-admin/edit.php2,095 ▲62.05 ▲0.0036.01 ▲0.1734.27 ▼0.98
Add New Post /wp-admin/post-new.php6,310 ▲4,79126.21 ▲3.11918.08 ▲248.3662.31 ▲5.11
Media Library /wp-admin/upload.php1,394 ▲34.23 ▲0.0596.29 ▼1.2039.76 ▼2.45
WP hReview /wp-admin/options-general.php?page=rkwpr_options9452.0322.0147.46

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_recent-posts
    • rkwpr_options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/rk-hreview-for-wp/rk-wp-hreview-admin.php on line 11
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/rk-hreview-for-wp/rk-wp-hreview.php on line 43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rk-hreview-for-wp/rk-wp-hreview.php:45

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=rkwpr_options
    • > Network (severe)
    wp-content/plugins/rk-hreview-for-wp/rk-wp-hreview-admin.css?ver=1.1.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
2 plugin tags: reviews, google

rk-hreview-for-wp/rk-wp-hreview.php 92% from 13 tests

The primary PHP file in "hReview for WordPress" version 1.1.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("rk-hreview-for-wp.php" instead of "rk-wp-hreview.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin855 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP217774847
CSS1108

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity89.50
▷ Minimum class complexity81.00
▷ Maximum class complexity98.00
Average method complexity5.66
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods38
▷ Static methods00.00%
▷ Public methods38100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin