68% rate-my-post

Code Review | Rate my Post - WP Rating System

WordPress plugin Rate my Post - WP Rating System scored68%from 54 tests.

About plugin

  • Plugin page: rate-my-post
  • Plugin version: 3.4.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 1, 2018
  • Latest release: Aug 11, 2023
  • Number of updates: 60
  • Update frequency: every 33.2 days
  • Top authors: blazk (100%)

Code review

54 tests

User reviews

138 reviews

Install metrics

20,000+ active /294,622 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.43ms] Passed 4 tests

An overview of server-side resources used by Rate my Post - WP Rating System
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1037.57 ▼4.99
Dashboard /wp-admin3.38 ▲0.0844.85 ▼8.23
Posts /wp-admin/edit.php3.43 ▲0.0847.08 ▲6.37
Add New Post /wp-admin/post-new.php5.99 ▲0.1089.32 ▼5.52
Media Library /wp-admin/upload.php3.31 ▲0.0833.61 ▲1.01
Settings /wp-admin/admin.php?page=rate-my-post3.5335.93
Analytics /wp-admin/admin.php?page=rate-my-post-analytics3.3428.86
Stats /wp-admin/admin.php?page=rate-my-post-stats3.3228.18

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 60 new files
Database: 1 new table, 12 new options
New tables
wp_rmp_analytics
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
rmp_security
rmp_version
widget_rate-my-post-top-rated-widget
rmp_options
rmp_admin_notices
widget_recent-posts
...

Browser metrics Passed 4 tests

Rate my Post - WP Rating System: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,869 ▲9813.62 ▼0.683.57 ▲1.6938.66 ▼4.96
Dashboard /wp-admin2,238 ▲505.24 ▲0.36106.54 ▼8.0540.37 ▼3.07
Posts /wp-admin/edit.php2,124 ▲352.34 ▲0.1640.09 ▲0.1538.07 ▲1.33
Add New Post /wp-admin/post-new.php6,291 ▲4,75426.29 ▲8.33915.89 ▲305.6472.17 ▲16.17
Media Library /wp-admin/upload.php1,423 ▲324.55 ▲0.36107.08 ▲7.4147.06 ▲4.04
Settings /wp-admin/admin.php?page=rate-my-post2,4542.1036.9743.39
Analytics /wp-admin/admin.php?page=rate-my-post-analytics9932.7344.0631.35
Stats /wp-admin/admin.php?page=rate-my-post-stats9432.6540.2230.69

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_rmp_analytics
  • Zombie WordPress options detected upon uninstall: 12 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • rmp_security
    • rmp_admin_notices
    • rmp_version
    • theysaidso_admin_options
    • rmp_options
    • rmp_customize_strings
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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 fix the following
  • 14× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/rate-my-post/public/templates/amp-css.php
    • > /wp-content/plugins/rate-my-post/public/templates/internal-css.php
    • > /wp-content/plugins/rate-my-post/admin/templates/menu-options.php
    • > /wp-content/plugins/rate-my-post/admin/templates/menu-alerts.php
    • > /wp-content/plugins/rate-my-post/admin/templates/stats.php
    • > /wp-content/plugins/rate-my-post/admin/templates/analytics.php
    • > /wp-content/plugins/rate-my-post/admin/templates/menu-customize.php
    • > /wp-content/plugins/rate-my-post/admin/templates/menu-security.php
    • > /wp-content/plugins/rate-my-post/admin/templates/meta-box.php
    • > /wp-content/plugins/rate-my-post/admin/templates/menu-migration.php
  • 55× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: post_id in wp-content/plugins/rate-my-post/public/templates/results-widget.php on line 15
    • > PHP Notice
      Undefined variable: customization_options in wp-content/plugins/rate-my-post/public/templates/internal-css.php on line 108
    • > PHP Notice
      Undefined variable: customization_options in wp-content/plugins/rate-my-post/public/templates/internal-css.php on line 102
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/rate-my-post/public/templates/internal-css.php on line 102
    • > PHP Notice
      Undefined variable: customization_options in wp-content/plugins/rate-my-post/public/templates/internal-css.php on line 62
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/rate-my-post/widgets/rate-my-post-top-rated-widget.php:13
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/rate-my-post/public/templates/internal-css.php on line 84
    • > PHP Notice
      Undefined variable: customization_options in wp-content/plugins/rate-my-post/public/templates/internal-css.php on line 49
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/rate-my-post/public/templates/internal-css.php on line 139
    • > PHP Notice
      Undefined variable: post_id in wp-content/plugins/rate-my-post/public/templates/amp-rating-widget.php on line 16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt might help

rate-my-post/rate-my-post.php Passed 13 tests

This is the main PHP file of "Rate my Post - WP Rating System" version 3.4.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
72 characters long description:
Allows you to easily add rating functionality to your WordPress website.

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
Good job! No executable or dangerous file extensions detected5,246 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
PHP408489495,214
SVG10023
JavaScript20145
CSS4004

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity36.15
▷ Minimum class complexity1.00
▷ Maximum class complexity225.00
Average method complexity4.24
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods141
▷ Static methods2114.89%
▷ Public methods7855.32%
▷ Protected methods00.00%
▷ Private methods6344.68%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
5 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/sort_both.png0.20KB0.29KB0.00%
admin/images/sort_asc_disabled.png0.14KB0.25KB0.00%
admin/images/sort_asc.png0.16KB0.25KB0.00%
admin/images/sort_desc.png0.15KB0.25KB0.00%
admin/images/sort_desc_disabled.png0.14KB0.25KB0.00%