78% five-star-ratings-shortcode

Code Review | Five-Star Ratings Shortcode

WordPress plugin Five-Star Ratings Shortcode scored78%from 54 tests.

About plugin

  • Plugin page: five-star-ratings...
  • Plugin version: 1.2.50
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Dec 8, 2019
  • Latest release: Nov 20, 2023
  • Number of updates: 96
  • Update frequency: every 15.0 days
  • Top authors: seezee (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

800+ active /17,989 total downloads

Benchmarks

Plugin footprint 64% 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: ▲5.07MB] [CPU: ▲358.87ms] 25% from 4 tests

Analyzing server-side resources used by Five-Star Ratings Shortcode
Please fix the following
  • CPU: Total CPU usage should be kept under 500.00ms (currently 2,133.45ms on /wp-admin/options-general.php?page=five-star-ratings-shortcode)
  • Extra RAM: Extra memory usage should kept under 5MB (currently 5.07MB on /wp-admin/admin.php?page=freemius)
  • Extra CPU: The extra CPU usage must be under 200.00ms (currently 358.87ms on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.93 ▲5.47403.07 ▲367.42
Dashboard /wp-admin8.95 ▲5.65425.25 ▲376.68
Posts /wp-admin/edit.php8.95 ▲5.59390.08 ▲341.79
Add New Post /wp-admin/post-new.php9.48 ▲3.60444.66 ▲349.58
Media Library /wp-admin/upload.php8.95 ▲5.72451.84 ▲415.63
Five Star Ratings Shortcode Documentation /wp-admin/options-general.php?page=five-star-ratings-shortcode8.952,133.45
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius8.95377.97

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 200 new files
Database: no new tables, 11 new options
New WordPress options
five-star-ratings-shortcodeversion
fsrs_version
widget_theysaidso_widget
can_compress_scripts
fs_active_plugins
fs_accounts
fs_debug_mode
db_upgraded
widget_recent-posts
widget_recent-comments
...

Browser metrics Passed 4 tests

Checking browser requirements for Five-Star Ratings Shortcode
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲3914.34 ▼0.031.72 ▼0.0133.35 ▼4.07
Dashboard /wp-admin2,219 ▲425.64 ▼0.0391.29 ▼12.3541.16 ▼1.74
Posts /wp-admin/edit.php2,122 ▲191.98 ▲0.0437.51 ▼4.4538.52 ▲1.70
Add New Post /wp-admin/post-new.php1,537 ▲1120.94 ▼2.23592.37 ▼118.1844.82 ▼5.98
Media Library /wp-admin/upload.php1,418 ▲184.26 ▲0.0894.33 ▼6.7641.36 ▼3.11
Five Star Ratings Shortcode Documentation /wp-admin/options-general.php?page=five-star-ratings-shortcode1,1231.9740.0660.93
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,0861.6624.5628.31

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/five-star-ratings-shortcode/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 10 options
    • fs_active_plugins
    • widget_theysaidso_widget
    • fs_accounts
    • five-star-ratings-shortcodeversion
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • fs_debug_mode
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: accessible, stars, ratings, shortcode, icon

five-star-ratings-shortcode/five-star-ratings-shortcode.php 92% from 13 tests

"Five-Star Ratings Shortcode" version 1.2.50's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected38,266 lines of code in 154 files:
LanguageFilesBlank linesComment linesLines of code
PHP1248,22517,88834,308
JavaScript114761633,126
Markdown12033426
CSS17353351
JSON10055

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity83.05
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.58
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes55
▷ Abstract classes23.64%
▷ Concrete classes5396.36%
▷ Final classes00.00%
Methods1,311
▷ Static methods20315.48%
▷ Public methods90969.34%
▷ Protected methods171.30%
▷ Private methods38529.37%
Functions104
▷ Named functions104100.00%
▷ Anonymous functions00.00%
Constants147
▷ Global constants10068.03%
▷ Class constants4731.97%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/five-star-ratings-shortcode.png3.31KB2.29KB▼ 30.91%