10% smart-testimonials

Code Review | Smart Testimonials plugin

WordPress plugin Smart Testimonials plugin scored 10% from 54 tests.

About plugin

  • Plugin page: smart-testimonials
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Nov 13, 2013
  • Latest release: Nov 20, 2013
  • Number of updates: 6
  • Update frequency: every 1.3 days
  • Top authors: AspireSolution (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,715 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/smart-testimonials/smart_testimonail.php+36
    Use of undefined constant FAQ_VER - assumed 'FAQ_VER' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.96MB] [CPU: ▼53.71ms] Passed 4 tests

Server-side resources used by Smart Testimonials plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.07 ▼35.83
Dashboard /wp-admin2.05 ▼1.265.54 ▼40.58
Posts /wp-admin/edit.php2.05 ▼1.315.82 ▼40.61
Add New Post /wp-admin/post-new.php2.05 ▼3.846.06 ▼97.82
Media Library /wp-admin/upload.php2.05 ▼1.186.76 ▼29.90
Add New Testimonial /wp-admin/post-new.php?post_type=asp_testi2.055.39
Categories /wp-admin/edit-tags.php?taxonomy=asp_testi_cat&post_type=asp_testi2.056.09
Settings /wp-admin/edit.php?post_type=asp_testi&page=asp_testi-options2.055.22
Instructions /wp-admin/edit.php?post_type=asp_testi&page=asp_testi-instructions2.056.66
All Testimonials /wp-admin/edit.php?post_type=asp_testi2.055.32
Tags /wp-admin/edit-tags.php?taxonomy=asp_testi_tag&post_type=asp_testi2.055.95
Sort Testimonials /wp-admin/edit.php?post_type=asp_testi&page=asp_testi-sort2.055.30

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options
widget_smart_testimonial_widget
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics 75% from 4 tests

Smart Testimonials plugin: an overview of browser usage
Having an awesome user experience is important, so please improve the following
  • Nodes: For the best user experience, please reduce the number of DOM nodes under 25,000 (currently 33,162 on /wp-admin/edit.php?post_type=asp_testi&page=asp_testi-options)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,870 ▲13513.78 ▼0.801.63 ▲0.0640.00 ▼0.93
Dashboard /wp-admin2,268 ▲775.10 ▲0.21108.40 ▲7.7369.81 ▲28.84
Posts /wp-admin/edit.php2,152 ▲632.33 ▲0.3037.94 ▲4.0337.11 ▲3.25
Add New Post /wp-admin/post-new.php1,586 ▲5318.53 ▼5.01642.27 ▼15.5141.69 ▼17.26
Media Library /wp-admin/upload.php1,441 ▲534.46 ▲0.26104.40 ▲2.5280.04 ▲36.57
Add New Testimonial /wp-admin/post-new.php?post_type=asp_testi2,4628.01190.90117.40
Categories /wp-admin/edit-tags.php?taxonomy=asp_testi_cat&post_type=asp_testi1,3282.1528.7628.71
Settings /wp-admin/edit.php?post_type=asp_testi&page=asp_testi-options33,1626.25307.8040.93
Instructions /wp-admin/edit.php?post_type=asp_testi&page=asp_testi-instructions1,0302.0426.2928.95
All Testimonials /wp-admin/edit.php?post_type=asp_testi1,1402.3034.5330.87
Tags /wp-admin/edit-tags.php?taxonomy=asp_testi_tag&post_type=asp_testi1,3032.1428.3228.26
Sort Testimonials /wp-admin/edit.php?post_type=asp_testi&page=asp_testi-sort8472.0426.6024.03

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the wp-color-picker handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_smart_testimonial_widget
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=asp_testi&page=asp_testi-sort
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the wp-color-picker handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=asp_testi&page=asp_testi-sort
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the wp-color-picker handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 27 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=asp_testi&page=asp_testi-sort
    • > Warning in wp-content/plugins/smart-testimonials/smart_testimonail.php+212
    Use of undefined constant FAQ_VER - assumed 'FAQ_VER' (this will throw an Error in a future version of PHP)
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=asp_testi&page=asp_testi-sort
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the asp_testi_front handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/smart-testimonials/pie/PIE.php
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/smart-testimonials/smart_testimonail.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-testimonials/meta_box.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/smart-testimonials/roundit.php:62
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/smart-testimonials/mutiple_testimonial_shortcode.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/smart-testimonials/class.widget_cat.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes: You can look at the official readme.txt

smart-testimonials/smart_testimonail.php 85% from 13 tests

"Smart Testimonials plugin" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("smart-testimonials.php" instead of "smart_testimonail.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 144 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected21,034 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript73,7282,71118,481
PHP63142431,339
CSS466561,214

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity29.33
▷ Minimum class complexity8.00
▷ Maximum class complexity68.00
Average method complexity4.40
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
plugin_images/faq_menu.png3.20KB0.55KB▼ 82.84%
inc/img/faq_admin_icon.png4.19KB1.29KB▼ 69.18%