78% wp-rate-and-review

Code Review | WP Rate And Review

WordPress plugin WP Rate And Review scored78%from 54 tests.

About plugin

  • Plugin page: wp-rate-and-review
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Aug 20, 2019
  • Latest release: Jun 12, 2023
  • Number of updates: 35
  • Update frequency: every 39.8 days
  • Top authors: krishna121 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,198 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼2.91ms] Passed 4 tests

A check of server-side resources used by WP Rate And Review
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1235.46 ▼2.09
Dashboard /wp-admin3.42 ▲0.1246.11 ▲1.62
Posts /wp-admin/edit.php3.53 ▲0.1843.56 ▼1.79
Add New Post /wp-admin/post-new.php6.00 ▲0.1289.13 ▼9.39
Media Library /wp-admin/upload.php3.34 ▲0.1235.90 ▲2.34

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 49 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for WP Rate And Review
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.35 ▼0.271.66 ▲0.1437.35 ▲0.02
Dashboard /wp-admin2,198 ▲185.55 ▼0.0982.84 ▼4.0338.09 ▼6.49
Posts /wp-admin/edit.php2,104 ▲41.95 ▼0.0035.53 ▲0.0335.57 ▲2.05
Add New Post /wp-admin/post-new.php1,541 ▲418.09 ▼0.07598.75 ▼32.9361.60 ▲14.46
Media Library /wp-admin/upload.php1,409 ▲64.17 ▼0.11100.93 ▲4.9544.16 ▼0.38

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-rate-and-review/includes/class-wpub-form-fields.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WPUB_Form_Fields' not found in wp-content/plugins/wp-rate-and-review/views/settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-rate-and-review/views/welcome.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
These attributes need your attention: You can look at the official readme.txt

wp-rate-and-review/wp-rate-and-review.php 92% from 13 tests

"WP Rate And Review" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.8" instead of "3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin6,641 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
CSS155,227855,122
PHP55122001,464
JavaScript316242
SVG11013

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity62.33
▷ Minimum class complexity17.00
▷ Maximum class complexity89.00
Average method complexity5.28
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods43
▷ Static methods36.98%
▷ Public methods43100.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

PNG files should be compressed to save space and minimize bandwidth usage
15 PNG files occupy 0.48MB with 0.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/4.png18.42KB7.09KB▼ 61.51%
assets/images/2.png19.57KB7.84KB▼ 59.96%
assets/images/banner-772x250.png56.94KB20.40KB▼ 64.18%
assets/images/6.png25.14KB9.32KB▼ 62.94%
assets/images/paypal2.png24.96KB3.98KB▼ 84.07%