79% rc-post-rating

Code Review | RC Post Rating

WordPress plugin RC Post Rating scored 79% from 54 tests.

About plugin

  • Plugin page: rc-post-rating
  • Plugin version: 1.0.9
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Jan 28, 2022
  • Latest release: Jun 19, 2023
  • Number of updates: 8
  • Update frequency: every 63.4 days
  • Top authors: rickcurran (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 643 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.61MB] [CPU: ▼21.62ms] Passed 4 tests

A check of server-side resources used by RC Post Rating
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1335.11 ▼10.79
Dashboard /wp-admin3.17 ▼0.1423.58 ▼23.79
Posts /wp-admin/edit.php3.54 ▲0.1948.68 ▲3.81
Add New Post /wp-admin/post-new.php3.31 ▼2.5834.92 ▼51.40
Media Library /wp-admin/upload.php3.35 ▲0.1335.74 ▼0.51
RC Post Rating /wp-admin/options-general.php?page=rcpr_post_rating_settings_screen3.3030.81

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

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

Browser metrics Passed 4 tests

A check of browser resources used by RC Post Rating
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,892 ▲15713.90 ▼0.677.47 ▲5.0939.70 ▼5.28
Dashboard /wp-admin2,214 ▲265.86 ▲0.02110.68 ▼6.1542.83 ▼4.14
Posts /wp-admin/edit.php2,097 ▲82.00 ▲0.0240.61 ▲6.5936.02 ▲0.39
Add New Post /wp-admin/post-new.php6,590 ▲5,05429.28 ▲6.28901.13 ▲251.9739.68 ▼8.35
Media Library /wp-admin/upload.php1,399 ▲114.27 ▲0.1192.76 ▼9.9240.06 ▼5.26
RC Post Rating /wp-admin/options-general.php?page=rcpr_post_rating_settings_screen9042.0325.0531.71

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=rcpr_post_rating_settings_screen
    • > Notice in wp-content/plugins/rc-post-rating/includes/settings.php+221
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/rc-post-rating/includes/shortcode.php:142
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rc-post-rating/includes/stats.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/rc-post-rating/includes/columns.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rc-post-rating/includes/block.php:84
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rc-post-rating/includes/settings.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rc-post-rating/includes/rest.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rc-post-rating/includes/settings.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: rate post, post rating, user-feedback, widgets, rating system...

rc-post-rating/rc-post-rating.php Passed 13 tests

The entry point to "RC Post Rating" version 1.0.9 is a PHP file that has certain tags in its header comment area
105 characters long description:
This plugin adds the ability for users to provide feedback on pages / posts via up / down rating buttons.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin632 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP818198509
JavaScript33321101
CSS13322

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions32
▷ Named functions2887.50%
▷ Anonymous functions412.50%
Constants0
▷ Global constants00.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 images were found in this plugin