10% starfish-reviews

Code Review | Starfish Review Generation & Marketing for WordPress

WordPress plugin Starfish Review Generation & Marketing for WordPress scored10%from 54 tests.

About plugin

  • Plugin page: starfish-reviews
  • Plugin version: 3.1.9
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Feb 16, 2018
  • Latest release: Nov 19, 2023
  • Number of updates: 122
  • Update frequency: every 17.2 days
  • Top authors: starfishwp (76.23%)silvercolt45 (20.49%)anasbinmukim (4.92%)Otto42 (1.64%)

Code review

54 tests

User reviews

24 reviews

Install metrics

200+ active /22,125 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/starfish-reviews/src/Migrations.class.php+81
    Undefined property: stdClass::$is_premium

Server metrics [RAM: ▲6.28MB] [CPU: ▲49.68ms] 75% from 4 tests

A check of server-side resources used by Starfish Review Generation & Marketing for WordPress
Please fix the following
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 6.28MB on /wp-admin/edit.php?post_type=starfish_testimonial)
PageMemory (MB)CPU Time (ms)
Home /9.06 ▲5.6072.71 ▲33.36
Dashboard /wp-admin10.13 ▲6.83119.55 ▲71.97
Posts /wp-admin/edit.php10.21 ▲6.85104.61 ▲54.94
Add New Post /wp-admin/post-new.php12.88 ▲6.99141.34 ▲46.54
Media Library /wp-admin/upload.php9.08 ▲5.8594.09 ▲63.89
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius9.0869.09
Funnels /wp-admin/edit.php?post_type=funnel9.0887.73
Settings /wp-admin/admin.php?page=starfish-settings9.0876.00
Feedback /wp-admin/edit.php?post_type=starfish_feedback9.0883.63
Testimonials /wp-admin/edit.php?post_type=starfish_testimonial9.0880.85

Server storage [IO: ▲8.13MB] [DB: ▲0.02MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 544 new files
Database: no new tables, 56 new options
New WordPress options
widget_recent-posts
srm_testimonial_email_notification_content
srm_review_scrape_cron
srm_affiliate_url
srm_install_date
srm_testimonial_labels_category
srm_testimonial_enable_email_notification
srm_feedback_slug
srm_funnel_submit_button
srm_testimonial_labels_name
...

Browser metrics Passed 4 tests

Checking browser requirements for Starfish Review Generation & Marketing for WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,048 ▲28616.44 ▲2.0812.99 ▲11.4332.06 ▼12.68
Dashboard /wp-admin2,320 ▲1406.66 ▲1.06125.63 ▲34.8676.17 ▲31.80
Posts /wp-admin/edit.php2,247 ▲1443.63 ▲1.6848.20 ▲8.5138.66 ▲4.76
Add New Post /wp-admin/post-new.php1,506 ▼2919.07 ▼6.03688.73 ▲86.1530.17 ▼33.84
Media Library /wp-admin/upload.php1,503 ▲1005.09 ▲0.90118.80 ▲16.8089.75 ▲44.11
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,1803.1845.7328.74
Funnels /wp-admin/edit.php?post_type=funnel1,2033.5353.0932.06
Settings /wp-admin/admin.php?page=starfish-settings1,2733.5547.8162.06
Feedback /wp-admin/edit.php?post_type=starfish_feedback1,1923.5354.9336.76
Testimonials /wp-admin/edit.php?post_type=starfish_testimonial1,3563.2858.1155.61

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/starfish-reviews/vendor/freemius/wordpress-sdk/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 56 options in the database
    • srm_clean_on_deactive
    • srm_funnel_public_review_text
    • srm_review_scrape_cron
    • srm_funnel_msg_no_thank_you
    • srm_testimonial_email_notification_from_name
    • srm_affiliate_url
    • srm_install_date
    • srm_review_scrape_refresh_time
    • srm_logging
    • srm_funnel_skip_feedback_text
    • ...

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/starfish-reviews/inc/dialogues/starfish-help-funnel.dialogue.php
    • > /wp-content/plugins/starfish-reviews/inc/starfish-settings-testimonial-instructions.inc.php
    • > /wp-content/plugins/starfish-reviews/inc/dialogues/starfish-help-settings.dialogue.php
  • 174× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Extension\\AbstractExtension' not found in wp-content/plugins/starfish-reviews/vendor/twig/twig/src/Extension/OptimizerExtension.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Unary\\AbstractUnary' not found in wp-content/plugins/starfish-reviews/vendor/twig/twig/src/Node/Expression/Unary/NotUnary.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\TokenParser\\AbstractTokenParser' not found in wp-content/plugins/starfish-reviews/vendor/twig/twig/src/TokenParser/SetTokenParser.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/starfish-reviews/vendor/twig/twig/src/Node/ForLoopNode.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/starfish-reviews/init/actions/api/starfish-api-meta.action.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/starfish-reviews/vendor/twig/twig/src/Node/Expression/Binary/ModBinary.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\TestExpression' not found in wp-content/plugins/starfish-reviews/vendor/twig/twig/src/Node/Expression/Test/SameasTest.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/starfish-reviews/init/shortcodes/starfish-main.shortcode.php:49
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/starfish-reviews/vendor/twig/twig/src/Node/SetNode.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/starfish-reviews/vendor/twig/twig/src/Test/NodeTestCase.php:20

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=starfish_testimonial
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: fa_data is not defined" "ReferenceError: fa_data is not defined\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/starfish-reviews/js/starfish-admin-freemius-account.js?ver=3.1.9:19:5)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=starfish_testimonial
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught ReferenceError: fa_data is not defined

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: These screenshots need descriptions #12, #13 in starfish-reviews/assets to your readme.txt
  • Screenshots: Please add an image for screenshot #1 (This is the process a positive reviewer will go through to leave a 5-star review.)
The official readme.txt is a good inspiration

starfish-reviews/starfish-reviews.php 85% from 13 tests

The main file in "Starfish Review Generation & Marketing for WordPress" v. 3.1.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 150 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis 97% from 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
No dangerous file extensions were detected62,145 lines of code in 437 files:
LanguageFilesBlank linesComment linesLines of code
PHP36411,39022,83254,464
PO File51,0112,1732,717
JavaScript151563011,295
SVG31031,235
CSS2420622977
Twig1200592
JSON700463
SQL200218
YAML24533157
Markdown28017
reStructuredText18510

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity26.09
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces27
Interfaces11
Traits0
Classes231
▷ Abstract classes135.63%
▷ Concrete classes21894.37%
▷ Final classes5726.15%
Methods2,235
▷ Static methods35015.66%
▷ Public methods1,72777.27%
▷ Protected methods652.91%
▷ Private methods44319.82%
Functions312
▷ Named functions28992.63%
▷ Anonymous functions237.37%
Constants349
▷ Global constants21962.75%
▷ Class constants13037.25%
▷ Public constants12898.46%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
42 PNG files occupy 1.75MB with 0.90MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png20.08KB8.14KB▼ 59.45%
assets/screenshot-11.png19.46KB7.77KB▼ 60.07%
src/freemius-pricing/c03f665db27af43971565560adfba594.png6.06KB3.01KB▼ 50.27%
assets/help/gating-public-review-text-1.png5.02KB3.29KB▼ 34.38%
assets/screenshot-7.png29.39KB13.58KB▼ 53.80%