10% rich-reviews

Code Review | Rich Reviews by Starfish

WordPress plugin Rich Reviews by Starfish scored10%from 54 tests.

About plugin

  • Plugin page: rich-reviews
  • Plugin version: 1.9.19
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Jan 25, 2013
  • Latest release: Jul 29, 2023
  • Number of updates: 117
  • Update frequency: every 32.8 days
  • Top authors: Nuanced Media (47.01%)starfishwp (35.9%)FoxyTechnology (16.24%)silvercolt45 (3.42%)

Code review

54 tests

User reviews

116 reviews

Install metrics

6,000+ active /218,495 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Warning in wp-content/plugins/rich-reviews/lib/rich-reviews-options.php+42
    array_merge(): Expected parameter 1 to be an array, bool given

Server metrics [RAM: ▲0.62MB] [CPU: ▲1.25ms] 75% from 4 tests

A check of server-side resources used by Rich Reviews by Starfish
Please fix the following
  • CPU: Total CPU usage should be kept under 500.00ms (currently 1,190.63ms on /wp-admin/admin.php?page=fp_admin_add_edit)
PageMemory (MB)CPU Time (ms)
Home /4.04 ▲0.5855.40 ▲16.93
Dashboard /wp-admin3.97 ▲0.6651.33 ▲3.20
Posts /wp-admin/edit.php4.02 ▲0.6654.66 ▲4.90
Add New Post /wp-admin/post-new.php6.50 ▲0.6288.31 ▼9.62
Media Library /wp-admin/upload.php3.83 ▲0.6044.31 ▲6.51
Add New Review /wp-admin/admin.php?page=fp_admin_add_edit3.971,190.63
Instructions /wp-admin/admin.php?page=rich_reviews_settings_main3.97164.25
Approved Reviews /wp-admin/admin.php?page=fp_admin_approved_reviews_page4.02159.45
Options /wp-admin/admin.php?page=fp_admin_options_page3.7935.60
Pending Reviews /wp-admin/admin.php?page=fp_admin_pending_reviews_page4.02162.44

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 56 new files
Database: 1 new table, 12 new options
New tables
wp_richreviews
New WordPress options
rr_markup_options
rr_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
rr_form_options
theysaidso_admin_options
widget_rr_show_all
rr_display_options
...

Browser metrics Passed 4 tests

Rich Reviews by Starfish: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,984 ▲23814.00 ▼0.139.16 ▲7.3043.82 ▼0.37
Dashboard /wp-admin2,292 ▲1004.88 ▼0.07103.43 ▼11.2981.00 ▲38.96
Posts /wp-admin/edit.php2,189 ▲1032.21 ▲0.1940.61 ▲3.8537.82 ▲6.59
Add New Post /wp-admin/post-new.php1,759 ▲24522.41 ▲4.71748.97 ▲50.2638.39 ▼19.15
Media Library /wp-admin/upload.php1,477 ▲894.35 ▲0.1198.17 ▼10.9085.74 ▲40.72
Add New Review /wp-admin/admin.php?page=fp_admin_add_edit1,9811.9332.1159.68
Instructions /wp-admin/admin.php?page=rich_reviews_settings_main2,1421.8227.1665.58
Approved Reviews /wp-admin/admin.php?page=fp_admin_approved_reviews_page2,1001.7325.3445.58
Options /wp-admin/admin.php?page=fp_admin_options_page9881.8227.2030.51
Pending Reviews /wp-admin/admin.php?page=fp_admin_pending_reviews_page2,1001.7726.7440.44

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_richreviews
  • This plugin did not uninstall successfully, leaving 12 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • rr_markup_options
    • rr_user_options
    • widget_rr_show_all
    • rr_admin_options
    • widget_theysaidso_widget
    • rr_display_options
    • rr_form_options
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 22× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_remote_get() in wp-content/plugins/rich-reviews/lib/rich-reviews-settings-communitybar.inc.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/rich-reviews/views/frontend/form/rr-text-input.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/rich-reviews/views/frontend/form/rr-textarea-input.php:5
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/rich-reviews/lib/rich-reviews-admin-tables.php on line 8
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/template.php' (include_path='.:/usr/share/php') in wp-content/plugins/rich-reviews/views/frontend/snippets.php on line 2
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/template.php): failed to open stream: No such file or directory in wp-content/plugins/rich-reviews/views/frontend/snippets.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/rich-reviews/views/admin/dashboard/rr_form.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/rich-reviews/lib/rich-reviews-options.php:888
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/rich-reviews/views/admin/add-edit.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/rich-reviews/views/admin/dashboard/instructions.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed: Please take inspiration from this readme.txt

rich-reviews/rich-reviews.php 92% from 13 tests

The primary PHP file in "Rich Reviews by Starfish" version 1.9.19 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 159 characters long)

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
Good job! No executable or dangerous file extensions detected5,217 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP233692103,595
SVG400627
Sass46419594
CSS2258296
JavaScript38099
CoffeeScript1206

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity24.33
▷ Minimum class complexity6.00
▷ Maximum class complexity62.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods113
▷ Static methods97.96%
▷ Public methods113100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions43
▷ Named functions4297.67%
▷ Anonymous functions12.33%
Constants56
▷ Global constants56100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
13 PNG files occupy 1.49MB with 0.77MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/starfish.png8.65KB3.98KB▼ 54.00%
assets/icon-128x128.png8.22KB3.84KB▼ 53.32%
assets/screenshot-2.png9.54KB2.03KB▼ 78.75%
assets/default_testimonial_source_icon.png5.30KB4.45KB▼ 16.09%
assets/alert.png12.59KB5.27KB▼ 58.11%