84% rating-plus

Code Review | Rating Plus

WordPress plugin Rating Plus scored 84% from 54 tests.

About plugin

  • Plugin page: rating-plus
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.6.1
  • WordPress version: 5.8.1
  • First release: Nov 4, 2015
  • Latest release: Dec 18, 2016
  • Number of updates: 40
  • Update frequency: every 11.2 days
  • Top authors: sombatos (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

70+ active / 5,757 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼136.80ms] Passed 4 tests

An overview of server-side resources used by Rating Plus
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.1737.22 ▲18.06
Dashboard /wp-admin3.12 ▲0.0649.15 ▲5.63
Posts /wp-admin/edit.php3.17 ▲0.0651.69 ▲5.06
Add New Post /wp-admin/post-new.php5.48 ▲0.0596.33 ▼560.58
Media Library /wp-admin/upload.php3.06 ▲0.0634.69 ▲2.68

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Rating Plus
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,691 ▲9516.34 ▲0.6710.62 ▲3.0850.11 ▲3.23
Dashboard /wp-admin2,980 ▲436.26 ▲0.26142.73 ▼13.01115.43 ▼4.80
Posts /wp-admin/edit.php2,749 ▲102.72 ▲0.0369.26 ▲0.9591.14 ▼3.65
Add New Post /wp-admin/post-new.php1,626 ▼5722.04 ▲3.16274.22 ▼102.87109.57 ▼1.79
Media Library /wp-admin/upload.php1,746 ▼615.12 ▲0.09164.61 ▲3.02122.11 ▲5.22

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
These items require your attention
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_ratingpluswidget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rating-plus/rating-plus.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: You are using too many tags: 73 tag instead of maximum 10
Please take inspiration from this readme.txt

rating-plus/rating-plus.php Passed 13 tests

This is the main PHP file of "Rating Plus" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
95 characters long description:
A simple and clean rating widget plugin allowing to add a sexy rate button to the widgets area.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin1,117 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PO File2192370

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions4100.00%
▷ Anonymous functions00.00%
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/select2/select2.png1.67KB0.99KB▼ 40.78%
assets/img/icon-256x256.png9.53KB5.15KB▼ 45.98%
assets/img/select2/select2x2.png0.83KB0.77KB▼ 6.15%
assets/img/icons.png10.60KB9.59KB▼ 9.50%