83% wp-testimonial-with-widget

Code Review | Testimonial Grid and Testimonial Slider plus Carousel with Rotator Widget

WordPress plugin Testimonial Grid and Testimonial Slider plus Carousel with Rotator Widget scored83%from 54 tests.

About plugin

  • Plugin page: wp-testimonial-wi...
  • Plugin version: 3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Sep 7, 2015
  • Latest release: Nov 27, 2023
  • Number of updates: 174
  • Update frequency: every 17.3 days
  • Top authors: anoopranawat (74.71%)wponlinesupport (25.86%)

Code review

54 tests

User reviews

33 reviews

Install metrics

10,000+ active /236,990 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.54MB] [CPU: ▲0.78ms] Passed 4 tests

An overview of server-side resources used by Testimonial Grid and Testimonial Slider plus Carousel with Rotator Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.4842.10 ▲2.86
Dashboard /wp-admin3.89 ▲0.5846.83 ▼2.10
Posts /wp-admin/edit.php3.94 ▲0.5952.00 ▲4.95
Add New Post /wp-admin/post-new.php6.44 ▲0.5685.63 ▼2.60
Media Library /wp-admin/upload.php3.75 ▲0.5238.37 ▲7.22

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 99 new files
Database: no new tables, 9 new options
New WordPress options
wpos_anylc_redirect
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_sp_testimonials
widget_recent-posts
wpos_anylc_site_uid
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Testimonial Grid and Testimonial Slider plus Carousel with Rotator Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,548 ▼1,23913.41 ▼0.991.47 ▼0.7417.80 ▼27.66
Dashboard /wp-admin2,221 ▲445.66 ▲0.1397.83 ▼3.8053.73 ▲8.41
Posts /wp-admin/edit.php2,125 ▲222.12 ▲0.1140.95 ▼2.9434.30 ▲0.65
Add New Post /wp-admin/post-new.php6,227 ▲4,70121.46 ▼1.55884.55 ▲116.1361.24 ▲5.39
Media Library /wp-admin/upload.php1,416 ▲224.19 ▲0.0097.89 ▼1.1937.88 ▼6.00

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • wpos_anylc_redirect
    • widget_theysaidso_widget
    • wpos_anylc_site_uid
    • db_upgraded
    • widget_sp_testimonials
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-testimonial-with-widget/wp-testimonials.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (17 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

wp-testimonial-with-widget/wp-testimonials.php 92% from 13 tests

The entry point to "Testimonial Grid and Testimonial Slider plus Carousel with Rotator Widget" version 3.5 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-testimonial-with-widget.php" instead of "wp-testimonials.php")

Code Analysis Passed 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 detected7,538 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
PHP368011,2644,102
SVG1002,671
JavaScript712658419
CSS73238344
JSON2002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity21.67
▷ Minimum class complexity3.00
▷ Maximum class complexity87.00
Average method complexity4.38
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes222.22%
Methods55
▷ Static methods23.64%
▷ Public methods5192.73%
▷ Protected methods00.00%
▷ Private methods47.27%
Functions42
▷ Named functions42100.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants18100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
37 PNG files occupy 0.60MB with 0.37MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/arrow-left.png1.15KB0.17KB▼ 85.11%
assets/images/essential-plugin-logo.png6.79KB2.57KB▼ 62.09%
assets/images/g-logo.png41.17KB14.04KB▼ 65.90%
wpos-plugins/assets/images/cart-2.png2.20KB1.82KB▼ 17.38%
assets/images/wpos-team.png171.41KB48.35KB▼ 71.79%