90% sx-site-rating

Code Review | Sx Site Rating

WordPress plugin Sx Site Rating scored90%from 54 tests.

About plugin

  • Plugin page: sx-site-rating
  • Plugin version: 0.9.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.3
  • WordPress version: 6.3.1
  • First release: Jun 16, 2020
  • Latest release: Jun 16, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: schizma79 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /361 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.04MB] [CPU: ▼8.99ms] Passed 4 tests

Server-side resources used by Sx Site Rating
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.23 ▼3.01
Dashboard /wp-admin3.34 ▲0.0449.72 ▼2.06
Posts /wp-admin/edit.php3.39 ▲0.0450.62 ▼0.52
Add New Post /wp-admin/post-new.php5.92 ▲0.0483.65 ▼28.22
Media Library /wp-admin/upload.php3.27 ▲0.0435.52 ▼2.67
Settings /wp-admin/admin.php?page=sx-rating-settings3.2325.96
View Ratings /wp-admin/admin.php?page=sx-rating3.2332.35

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 9 new options
New WordPress options
sx_ratings
can_compress_scripts
widget_recent-posts
db_upgraded
widget_sx_site_rating_widget
widget_recent-comments
theysaidso_admin_options
sx_rating_settings
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Sx Site Rating
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,925 ▲16413.41 ▼0.948.17 ▲5.9438.32 ▼4.49
Dashboard /wp-admin2,220 ▲465.62 ▲0.0497.70 ▼1.2041.91 ▼7.06
Posts /wp-admin/edit.php2,125 ▲252.03 ▲0.0839.53 ▲4.2334.95 ▼4.70
Add New Post /wp-admin/post-new.php1,547 ▲1923.22 ▼0.04610.98 ▼67.6253.23 ▲0.07
Media Library /wp-admin/upload.php1,428 ▲284.19 ▼0.04101.06 ▼2.0542.86 ▼5.48
Settings /wp-admin/admin.php?page=sx-rating-settings9182.0225.9054.81
View Ratings /wp-admin/admin.php?page=sx-rating8442.0023.3359.66

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 9 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_sx_site_rating_widget
    • sx_rating_settings
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • sx_ratings

Smoke tests Passed 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 Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Donate link: Invalid URI ("")
Please take inspiration from this readme.txt

sx-site-rating/sx-site-rating.php Passed 13 tests

The main file in "Sx Site Rating" v. 0.9.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
46 characters long description:
A simple rating plugin for your wordpress site

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin967 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3121109642
CSS14116210
JavaScript2242115

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity60.00
▷ Minimum class complexity60.00
▷ Maximum class complexity60.00
Average method complexity9.43
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods685.71%
▷ Protected methods00.00%
▷ Private methods114.29%
Functions25
▷ Named functions25100.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
No PNG images were found in this plugin