57% gs-testimonial

Code Review | A WordPress Testimonial Plugin to Showcase Testimonial Slider, Testimonial Grid and More: Solid Testimonial

WordPress plugin A WordPress Testimonial Plugin to Showcase Testimonial Slider, Testimonial Grid and More: Solid Testimonial scored57%from 54 tests.

About plugin

  • Plugin page: gs-testimonial
  • Plugin version: 3.0.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.4
  • WordPress version: 6.3.1
  • First release: Jan 15, 2015
  • Latest release: Nov 29, 2023
  • Number of updates: 156
  • Update frequency: every 20.8 days
  • Top authors: samdani (100%)

Code review

54 tests

User reviews

31 reviews

Install metrics

1,000+ active /77,776 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲5.58MB] [CPU: ▲26.69ms] 50% from 4 tests

Analyzing server-side resources used by A WordPress Testimonial Plugin to Showcase Testimonial Slider, Testimonial Grid and More: Solid Testimonial
Please have a look at the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 662.35ms on /wp-admin/edit.php?post_type=gs_testimonial&page=gs-testimonial-plugins-premium)
  • Extra RAM: Extra memory usage should kept under 5MB (currently 5.58MB on /wp-admin/edit.php?post_type=gs_testimonial&page=gs-testimonial-plugins-premium)
PageMemory (MB)CPU Time (ms)
Home /9.22 ▲5.7673.09 ▲24.54
Dashboard /wp-admin9.24 ▲5.9485.38 ▲36.66
Posts /wp-admin/edit.php9.24 ▲5.8988.92 ▲40.08
Add New Post /wp-admin/post-new.php10.62 ▲4.73100.94 ▲9.47
Media Library /wp-admin/upload.php9.24 ▲6.0268.67 ▲36.10
GS Plugins Lite /wp-admin/edit.php?post_type=gs_testimonial&page=gs-testimonial-plugins-lite9.25713.62
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius9.2461.91
GS Plugins Pro /wp-admin/edit.php?post_type=gs_testimonial&page=gs-testimonial-plugins-premium9.25662.35

Server storage [IO: ▲5.32MB] [DB: ▲0.05MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 269 new files
Database: 1 new table, 11 new options
New tables
wp_gstm_shortcodes
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
wp_gstm_db_version
fs_accounts
db_upgraded
gs_testimonial_plugin_permalinks_flushed
fs_debug_mode
can_compress_scripts
...

Browser metrics Passed 4 tests

A WordPress Testimonial Plugin to Showcase Testimonial Slider, Testimonial Grid and More: Solid Testimonial: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲9014.58 ▲0.371.77 ▼0.1127.87 ▼19.34
Dashboard /wp-admin2,279 ▲1055.57 ▼0.0898.58 ▲3.4585.56 ▲44.75
Posts /wp-admin/edit.php2,185 ▲852.00 ▲0.0540.81 ▲2.9039.15 ▲4.42
Add New Post /wp-admin/post-new.php1,633 ▲9623.00 ▼0.11691.27 ▲21.4431.79 ▼21.75
Media Library /wp-admin/upload.php1,484 ▲844.07 ▼0.0999.98 ▲0.7783.79 ▲41.26
GS Plugins Lite /wp-admin/edit.php?post_type=gs_testimonial&page=gs-testimonial-plugins-lite2,5592.0533.27102.62
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,1141.6624.4824.63
GS Plugins Pro /wp-admin/edit.php?post_type=gs_testimonial&page=gs-testimonial-plugins-premium2,1552.0530.1562.25

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/gs-testimonial/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_gstm_shortcodes
  • Zombie WordPress options detected upon uninstall: 11 options
    • wp_gstm_db_version
    • db_upgraded
    • fs_debug_mode
    • theysaidso_admin_options
    • fs_accounts
    • gs_testimonial_plugin_permalinks_flushed
    • can_compress_scripts
    • widget_recent-comments
    • fs_active_plugins
    • widget_theysaidso_widget
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/gs-testimonial/includes/integrations/beaver/includes/frontend.php
  • 13× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/gs-testimonial/templates/gs-grid-template-03.php:13
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/gs-testimonial/templates/gs-grid-template-01.php:13
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/gs-testimonial/includes/integrations/beaver/includes/frontend.php on line 3
    • > PHP Notice
      Undefined variable: gs_t_loop in wp-content/plugins/gs-testimonial/templates/gs-grid-template-03.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/gs-testimonial/includes/shortcode-builder/preview.php:1
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/gs-testimonial/templates/gs-grid-template-02.php:13
    • > PHP Notice
      Undefined variable: gs_t_loop in wp-content/plugins/gs-testimonial/templates/gs-grid-template-02.php on line 13
    • > PHP Notice
      Trying to get property 'shortcode_id' of non-object in wp-content/plugins/gs-testimonial/includes/integrations/beaver/includes/frontend.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/gs-testimonial/includes/gs-common-pages/gs-testimonial-common-pages.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'td_block' not found in wp-content/plugins/gs-testimonial/includes/integrations/includes/gs-testimonial-block.php:3

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: best testimonial plugin, free testimonial plugin, testimonial, wordpress testimonial plugin, testimonial showcase...

gs-testimonial/gs-testimonial.php 85% from 13 tests

"A WordPress Testimonial Plugin to Showcase Testimonial Slider, Testimonial Grid and More: Solid Testimonial" version 3.0.8'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:
  • Description: Keep the plugin description shorter than 140 characters (currently 371 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected41,938 lines of code in 199 files:
LanguageFilesBlank linesComment linesLines of code
PHP1559,49918,01839,002
CSS26411252,721
JavaScript143686211
SVG3003
JSON1001

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity62.14
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces2
Interfaces1
Traits0
Classes80
▷ Abstract classes33.75%
▷ Concrete classes7796.25%
▷ Final classes45.19%
Methods1,566
▷ Static methods21713.86%
▷ Public methods1,14673.18%
▷ Protected methods332.11%
▷ Private methods38724.71%
Functions146
▷ Named functions12887.67%
▷ Anonymous functions1812.33%
Constants151
▷ Global constants10468.87%
▷ Class constants4731.13%
▷ 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
14 PNG files occupy 0.08MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/dummy-data/gstm-client-company-4.png3.00KB2.68KB▼ 10.86%
assets/rateit-js/star-white32.png1.62KB1.41KB▼ 13.42%
assets/img/dummy-data/gstm-client-company-5.png2.26KB2.30KB0.00%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
assets/img/no_img.png8.45KB3.71KB▼ 56.07%