84% fg-testimonials

Code Review | FG Testimonials

WordPress plugin FG Testimonials scored84%from 54 tests.

About plugin

  • Plugin page: fg-testimonials
  • Plugin version: 1.5.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.6
  • WordPress version: 6.3.1
  • First release: Jul 10, 2018
  • Latest release: Feb 22, 2021
  • Number of updates: 32
  • Update frequency: every 29.9 days
  • Top authors: priyankawp (50%)pravind (50%)fudugo (6.25%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /874 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.16MB] [CPU: ▼0.50ms] Passed 4 tests

Server-side resources used by FG Testimonials
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1644.46 ▼2.37
Dashboard /wp-admin3.46 ▲0.1652.84 ▲1.86
Posts /wp-admin/edit.php3.58 ▲0.2249.58 ▼3.03
Add New Post /wp-admin/post-new.php6.04 ▲0.1697.67 ▲1.53
Media Library /wp-admin/upload.php3.38 ▲0.1541.58 ▲2.61
Add New /wp-admin/post-new.php?post_type=fgts_post_type3.5153.67
Settings /wp-admin/edit.php?post_type=fgts_post_type&page=fgts_testimonial_setting_page3.3651.31
Categories /wp-admin/edit-tags.php?taxonomy=fgts-category&post_type=fgts_post_type3.3837.86
All /wp-admin/edit.php?post_type=fgts_post_type3.4340.12

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 18 new options
New WordPress options
fgts_numofslide_tablet
fgts_numofslide_mobile
widget_theysaidso_widget
fgts_numof_smartspeed
widget_recent-comments
widget_recent-posts
db_upgraded
fgts_loop_set
theysaidso_admin_options
can_compress_scripts
...

Browser metrics Passed 4 tests

A check of browser resources used by FG Testimonials
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲8314.43 ▼0.004.00 ▲2.2876.78 ▲33.81
Dashboard /wp-admin2,235 ▲585.62 ▲0.0698.25 ▲2.0543.38 ▼4.97
Posts /wp-admin/edit.php2,137 ▲372.01 ▼0.0235.81 ▲2.2135.81 ▼1.16
Add New Post /wp-admin/post-new.php1,557 ▲3120.97 ▼2.16657.98 ▲23.8068.50 ▲16.88
Media Library /wp-admin/upload.php1,440 ▲374.20 ▲0.03110.29 ▲4.6146.48 ▼1.34
Add New /wp-admin/post-new.php?post_type=fgts_post_type2,3487.69174.7168.67
Settings /wp-admin/edit.php?post_type=fgts_post_type&page=fgts_testimonial_setting_page9532.0425.6227.51
Categories /wp-admin/edit-tags.php?taxonomy=fgts-category&post_type=fgts_post_type1,3082.1225.8730.51
All /wp-admin/edit.php?post_type=fgts_post_type1,1181.9830.2531.19

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 18 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • fgts_designation_chkbx
    • fgts_autoplayhover
    • widget_theysaidso_widget
    • fgts_img_chkbx
    • theysaidso_admin_options
    • fgts_control_dots
    • fgts_loop_set
    • fgts_numof_smartspeed
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% 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
  • 4× 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/fg-testimonials/include/fg-setting/fg-settings.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fg-testimonials/include/fg-testimonial-meta.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fg-testimonials/fg-testimonial.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/fg-testimonials/include/fg-testimonial-shortcode.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: fg testimonials, testimonial slider, carousel client, client carousel, testimonials...

fg-testimonials/fg-testimonial.php 92% from 13 tests

The main PHP file in "FG Testimonials" ver. 1.5.7 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("fg-testimonials.php" instead of "fg-testimonial.php")

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
Success! There were no dangerous files found in this plugin3,280 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
PHP512042431
CSS5614150
JavaScript241028

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity15.50
▷ Minimum class complexity11.00
▷ Maximum class complexity18.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods34
▷ Static methods00.00%
▷ Public methods34100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/right-arrow.png4.23KB2.05KB▼ 51.56%
images/default.png8.92KB7.13KB▼ 20.08%
images/left-arrow.png4.17KB2.10KB▼ 49.68%