84% si-rating-review

Code Review | SI Rating & Review

WordPress plugin SI Rating & Review scored84%from 54 tests.

About plugin

  • Plugin page: si-rating-review
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.6
  • WordPress version: 6.3.1
  • First release: Jan 6, 2016
  • Latest release: Nov 24, 2020
  • Number of updates: 40
  • Update frequency: every 44.6 days
  • Top authors: hiren1612 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,042 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
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼1.73ms] Passed 4 tests

Server-side resources used by SI Rating & Review
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /32.05 ▲0.015,848,605.69 ▲8,171.38
Dashboard /wp-admin3.40 ▲0.0550.79 ▲0.51
Posts /wp-admin/edit.php3.52 ▲0.1151.24 ▲1.03
Add New Post /wp-admin/post-new.php6.00 ▲0.0799.66 ▼7.05
Media Library /wp-admin/upload.php3.33 ▲0.0537.54 ▼1.40

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 12 new files
Database: 1 new table, 6 new options
New tables
wp_si_rating_review
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for SI Rating & Review
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲5314.73 ▲0.382.43 ▲0.6044.32 ▲1.52
Dashboard /wp-admin2,210 ▲324.84 ▼0.8787.35 ▼33.7145.61 ▲0.46
Posts /wp-admin/edit.php2,121 ▲212.49 ▲0.5336.38 ▲2.0533.33 ▼0.17
Add New Post /wp-admin/post-new.php1,544 ▲1623.49 ▲0.46649.20 ▼37.8957.92 ▲3.64
Media Library /wp-admin/upload.php1,415 ▲124.39 ▲0.1498.12 ▼6.5645.45 ▲4.14

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% 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
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/si-rating-review/list_review_rating.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/si-rating-review/list_review_rating.php:2

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)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: rating_url, rating_ip, rating_count, rating_description, rating_title

si-rating-review/si-rating-review.php Passed 13 tests

The entry point to "SI Rating & Review" version 1.2 is a PHP file that has certain tags in its header comment area
58 characters long description:
Allows user to add rating and review with simple on click.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected741 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP31844495
JavaScript2118207
CSS20039

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
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
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/sort_desc.png0.15KB0.25KB0.00%
images/sort_both.png0.20KB0.29KB0.00%
images/sort_asc.png0.16KB0.25KB0.00%