78% smartarget-reviews

Code Review | Smartarget Reviews

WordPress plugin Smartarget Reviews scored78%from 54 tests.

About plugin

  • Plugin page: smartarget-reviews
  • Plugin version: 1.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: May 15, 2022
  • Latest release: Aug 9, 2023
  • Number of updates: 14
  • Update frequency: every 32.4 days
  • Top authors: erezs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /268 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼1.09ms] Passed 4 tests

A check of server-side resources used by Smartarget Reviews
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0747.01 ▲0.28
Dashboard /wp-admin3.37 ▲0.0654.31 ▲2.33
Posts /wp-admin/edit.php3.49 ▲0.1355.40 ▲1.59
Add New Post /wp-admin/post-new.php5.97 ▲0.0887.38 ▼8.54
Media Library /wp-admin/upload.php3.30 ▲0.0640.31 ▲3.16
Smartarget Reviews /wp-admin/options-general.php?page=smartarget_reviews3.2636.32

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Smartarget Reviews
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,896 ▲11020.95 ▲6.419.36 ▲7.3442.89 ▼5.37
Dashboard /wp-admin2,205 ▲2510.62 ▲5.01186.49 ▲86.4337.98 ▼5.55
Posts /wp-admin/edit.php2,119 ▲197.28 ▲5.30118.73 ▲82.7633.41 ▼2.78
Add New Post /wp-admin/post-new.php1,541 ▲1526.10 ▲2.31774.67 ▲61.1355.96 ▼7.17
Media Library /wp-admin/upload.php1,410 ▲169.40 ▲5.18182.17 ▲78.7845.77 ▲2.64
Smartarget Reviews /wp-admin/options-general.php?page=smartarget_reviews2,18411.35201.19142.81

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/smartarget-reviews/public/partials/smartarget-reviews-public-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_url() in wp-content/plugins/smartarget-reviews/admin/partials/smartarget-reviews-admin-display.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: satismetr, feedback, testimonials, smartarget, review...

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

Analyzing the main PHP file in "Smartarget Reviews" version 1.2
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected423 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12130522225
JavaScript351,390198
CSS1040

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin