71% tg-testimonials

Code Review | Tg Testimonials - Wordpress Testimonial Slider Plugin

WordPress plugin Tg Testimonials - Wordpress Testimonial Slider Plugin scored71%from 54 tests.

About plugin

  • Plugin page: tg-testimonials
  • Plugin version: 1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.9
  • WordPress version: 6.3.1
  • First release: Feb 11, 2021
  • Latest release: Apr 4, 2022
  • Number of updates: 8
  • Update frequency: every 52.1 days
  • Top authors: abuzarmustansar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /539 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.57MB] [CPU: ▼18.68ms] Passed 4 tests

This is a short check of server-side resources used by Tg Testimonials - Wordpress Testimonial Slider Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1139.60 ▼2.82
Dashboard /wp-admin3.43 ▲0.1248.50 ▼2.82
Posts /wp-admin/edit.php3.55 ▲0.1959.38 ▲6.88
Add New Post /wp-admin/post-new.php3.26 ▼2.6336.50 ▼71.54
Media Library /wp-admin/upload.php3.34 ▲0.1036.58 ▲2.45
All Testimonials /wp-admin/edit.php?post_type=tg_testimonials3.4143.40
Add New /wp-admin/post-new.php?post_type=tg_testimonials3.2634.85
Testimonial category /wp-admin/edit-tags.php?taxonomy=tg_testimonial_category&post_type=tg_testimonials3.3640.76
Shortcodes /wp-admin/edit.php?post_type=tg_testimonials&page=tg_testimonials_shortcodes3.3338.65

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Tg Testimonials - Wordpress Testimonial Slider Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,987 ▲24114.92 ▲0.654.16 ▲2.3742.73 ▲0.43
Dashboard /wp-admin2,377 ▲1926.49 ▲0.44129.66 ▲27.7740.37 ▼2.79
Posts /wp-admin/edit.php2,283 ▲1943.33 ▲1.3153.14 ▲16.7933.82 ▼0.78
Add New Post /wp-admin/post-new.php1,545 ▲3117.85 ▲0.33668.91 ▼5.6636.47 ▼19.52
Media Library /wp-admin/upload.php1,428 ▲374.12 ▼0.0477.95 ▼22.5146.10 ▲2.27
All Testimonials /wp-admin/edit.php?post_type=tg_testimonials1,2693.2946.8027.49
Add New /wp-admin/post-new.php?post_type=tg_testimonials2,5097.78177.1368.21
Testimonial category /wp-admin/edit-tags.php?taxonomy=tg_testimonial_category&post_type=tg_testimonials1,4653.1441.2426.69
Shortcodes /wp-admin/edit.php?post_type=tg_testimonials&page=tg_testimonials_shortcodes1,0723.0238.3728.51

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
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/post-new.php?post_type=tg_testimonials
    • > Notice in wp-content/plugins/tg-testimonials/admin/testimonials.php+183
    Undefined index: tg_testimonials_company_logo

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
The following issues need your attention
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/tg-testimonials/templates/tg-testimonial-template2.php
    • > /wp-content/plugins/tg-testimonials/templates/tg-testimonial-template1.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tg-testimonials/admin/testimonials.php:59
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/tg-testimonials/core/shortcode-info.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid URI ("")
  • Tags: Please delete some tags, you are using 33 tag instead of maximum 10
  • Screenshots: Please describe screenshot #6 in tg-testimonials/assets to your readme.txt
The official readme.txt might help

tg-testimonials/tg-testimonials.php 92% from 13 tests

This is the main PHP file of "Tg Testimonials - Wordpress Testimonial Slider Plugin" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • 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 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected11,605 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
CSS42,154598,867
SVG1002,105
PHP812267547
JavaScript371086

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods538.46%
▷ Protected methods00.00%
▷ Private methods861.54%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/commos-3rd.png1.53KB0.81KB▼ 46.91%
assets/images/commo.png1.53KB0.81KB▼ 46.91%
(invalid) assets/images/commos-3r.png0.45KB0.00KB▼ 100.00%