89% parstools-star-rating

Code Review | Parstools Star Rating

WordPress plugin Parstools Star Rating scored89%from 54 tests.

About plugin

  • Plugin page: parstools-star-ra...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5
  • WordPress version: 6.3.1
  • First release: Jun 21, 2016
  • Latest release: Jul 5, 2016
  • Number of updates: 6
  • Update frequency: every 2.3 days
  • Top authors: parstools (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,456 total downloads

Benchmarks

Plugin footprint 83% 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.10MB] [CPU: ▼2.99ms] Passed 4 tests

A check of server-side resources used by Parstools Star Rating
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1139.55 ▼6.20
Dashboard /wp-admin3.41 ▲0.1151.78 ▲1.50
Posts /wp-admin/edit.php3.53 ▲0.1749.83 ▲2.04
Add New Post /wp-admin/post-new.php5.99 ▲0.1095.80 ▼9.29
Media Library /wp-admin/upload.php3.34 ▲0.1042.22 ▲6.34
Parstools Star Rating /wp-admin/options-general.php?page=parstools_star_rating_options3.3033.51

Server storage [IO: ▲0.61MB] [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: 183 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Parstools Star Rating: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲4214.73 ▲0.372.21 ▼0.1842.65 ▼0.27
Dashboard /wp-admin2,226 ▲495.61 ▼0.0686.37 ▼11.9539.81 ▼2.50
Posts /wp-admin/edit.php2,112 ▲122.01 ▲0.0433.82 ▼2.2637.26 ▲0.59
Add New Post /wp-admin/post-new.php1,534 ▲823.04 ▼0.54618.85 ▼41.5543.83 ▼14.81
Media Library /wp-admin/upload.php1,409 ▲124.22 ▼0.0696.51 ▼4.7146.04 ▲2.54
Parstools Star Rating /wp-admin/options-general.php?page=parstools_star_rating_options1,3862.3027.84170.79

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

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 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: Too many tags (24 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (screenshot-1.jpg), #2 (screenshot-2.jpg)
The official readme.txt might help

parstools-star-rating/parstools-star-rating.php Passed 13 tests

The entry point to "Parstools Star Rating" version 1.0.0 is a PHP file that has certain tags in its header comment area
70 characters long description:
Add fancy star rating to any type of post and page with elegant themes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected586 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP8140461456
PO File128760288
CSS110442

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity13.40
▷ Minimum class complexity1.00
▷ Maximum class complexity38.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods2477.42%
▷ Protected methods00.00%
▷ Private methods722.58%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
165 PNG files occupy 0.32MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/themes/32-3e.png2.08KB1.16KB▼ 44.21%
admin/themes/7h.png1.43KB0.52KB▼ 63.36%
admin/themes/24-6e.png1.82KB1.35KB▼ 26.11%
admin/themes/32-8e.png1.87KB1.10KB▼ 41.27%
admin/themes/5f.png1.28KB0.44KB▼ 65.77%