72% testimonials-widget

Code Review | Testimonials Widget

WordPress plugin Testimonials Widget scored72%from 54 tests.

About plugin

  • Plugin page: testimonials-widget
  • Plugin version: 4.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.2-5.9.3
  • WordPress version: 6.3.1
  • First release: Aug 15, 2011
  • Latest release: May 3, 2022
  • Number of updates: 795
  • Update frequency: every 4.9 days
  • Top authors: comprock (94.59%)saurabhd (2.77%)j0hnsmith (1.76%)subharanjan (1.26%)

Code review

54 tests

User reviews

117 reviews

Install metrics

10,000+ active /1,150,820 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.36MB] [CPU: ▲1.82ms] Passed 4 tests

An overview of server-side resources used by Testimonials Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3343.80 ▲0.89
Dashboard /wp-admin3.73 ▲0.4377.20 ▲28.11
Posts /wp-admin/edit.php3.77 ▲0.4151.51 ▲0.29
Add New Post /wp-admin/post-new.php6.25 ▲0.3690.09 ▼1.62
Media Library /wp-admin/upload.php3.57 ▲0.3442.23 ▲7.72
Add New /wp-admin/post-new.php?post_type=testimonials-widget4.0262.74
Settings /wp-admin/edit.php?post_type=testimonials-widget&page=testimonialswidget_settings4.2776.27
Clear Cache /wp-admin/edit.php?post_type=testimonials-widget&page=testimonials-widget-premium-cache4.0953.68
Testimonials /wp-admin/edit.php?post_type=testimonials-widget4.2547.64
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=testimonials-widget3.5739.35
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=testimonials-widget3.5750.73

Server storage [IO: ▲10.79MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 624 new files
Database: no new tables, 14 new options
New WordPress options
widget_tw_tag_cloud_widget
category_children
db_upgraded
widget_twp_form_widget
widget_tw_recent_testimonials_widget
can_compress_scripts
widget_tw_categories_widget
testimonialswidget_settings
widget_testimonials_widget
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Testimonials Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,860 ▲12513.55 ▼0.821.85 ▼0.1242.07 ▼5.02
Dashboard /wp-admin2,248 ▲574.82 ▼0.04100.48 ▼18.8745.41 ▼1.07
Posts /wp-admin/edit.php2,134 ▲482.02 ▼0.0334.68 ▼3.6135.44 ▲3.09
Add New Post /wp-admin/post-new.php1,551 ▲1617.73 ▼5.22578.98 ▼75.2942.55 ▼10.14
Media Library /wp-admin/upload.php1,436 ▲514.18 ▼0.0392.93 ▼8.5142.62 ▼3.08
Add New /wp-admin/post-new.php?post_type=testimonials-widget2,8918.07200.2278.95
Settings /wp-admin/edit.php?post_type=testimonials-widget&page=testimonialswidget_settings5,8602.1645.3782.43
Clear Cache /wp-admin/edit.php?post_type=testimonials-widget&page=testimonials-widget-premium-cache7982.0228.2028.88
Testimonials /wp-admin/edit.php?post_type=testimonials-widget1,2101.9835.6732.25
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=testimonials-widget1,3522.1429.9929.53
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=testimonials-widget1,4852.1428.4832.02

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 14 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • category_children
    • widget_tw_tag_cloud_widget
    • widget_twp_form_widget
    • widget_tw_archives_widget
    • widget_tw_recent_testimonials_widget
    • db_upgraded
    • theysaidso_admin_options
    • ...

Smoke tests 25% 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)
Good news, no errors were detected

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
The following issues need your attention
  • 38× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/testimonials-widget/includes/libraries/testimonials-widget/templates/span-job-title.php
    • > /wp-content/plugins/testimonials-widget/templates/single-excerpt.php
    • > /wp-content/plugins/testimonials-widget/templates/testimonial-extra.php
    • > /wp-content/plugins/testimonials-widget/includes/libraries/class-redrokk-metabox-class.php
    • > /wp-content/plugins/testimonials-widget/includes/libraries/testimonials-widget/templates/testimonial-bottom.php
    • > /wp-content/plugins/testimonials-widget/templates/testimonial-close.php
    • > /wp-content/plugins/testimonials-widget/includes/libraries/testimonials-widget/templates/testimonial-extra.php
    • > /wp-content/plugins/testimonials-widget/templates/span-join-location.php
    • > /wp-content/plugins/testimonials-widget/includes/libraries/testimonials-widget/templates/span-join-title.php
    • > /wp-content/plugins/testimonials-widget/templates/link-after.php
  • 277× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/testimonials-widget/templates/testimonial-open.php on line 8
    • > PHP Fatal error
      require_once(): Failed opening required 'TWP_DIR_INCclass-testimonials-widget-premium-antispam-bee-base.php' (include_path='.:/usr/share/php') in wp-content/plugins/testimonials-widget/includes/class-testimonials-widget-premium-antispam-bee.php on line 21
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/testimonials-widget/includes/libraries/testimonials-widget/templates/span-location.php on line 4
    • > PHP Warning
      require_once(AIHR_DIR_INCclass-aihrus-widget.php): failed to open stream: No such file or directory in wp-content/plugins/testimonials-widget/includes/class-testimonials-widget-recent-testimonials-widget.php on line 21
    • > PHP Fatal error
      require_once(): Failed opening required 'AIHR_DIRaihrus-framework.php' (include_path='.:/usr/share/php') in wp-content/plugins/testimonials-widget/includes/requirements.php on line 21
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/testimonials-widget/includes/libraries/testimonials-widget/templates/testimonial-open.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/testimonials-widget/templates/testimonial-cite.php on line 12
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/testimonials-widget/templates/links-more.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'TW_DIR_LIBaihrus-framework/aihrus-framework.php' (include_path='.:/usr/share/php') in wp-content/plugins/testimonials-widget/includes/libraries/testimonials-widget/includes/requirements.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function feed_content_type() in wp-content/plugins/testimonials-widget/includes/feed-rss2.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/edit.php?post_type=testimonials-widget&page=testimonialswidget_settings
    • > Network (severe)
    https://store.axelerant.com/wp-content/uploads/2015/02/IGP7228-2015-01-22-at-05-18-02.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
Please take inspiration from this readme.txt

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

The primary PHP file in "Testimonials Widget" version 4.0.4 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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 detected29,270 lines of code in 315 files:
LanguageFilesBlank linesComment linesLines of code
PHP1055,0664,01617,258
Markdown771,25404,524
JavaScript223901,4383,267
Handlebars28458301,577
CSS1010462770
PO File4271501673
HTML5311812655
LESS23327251
JSON1040245
XML40050

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity37.66
▷ Minimum class complexity1.00
▷ Maximum class complexity242.00
Average method complexity3.97
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces2
Interfaces7
Traits0
Classes67
▷ Abstract classes1217.91%
▷ Concrete classes5582.09%
▷ Final classes11.82%
Methods936
▷ Static methods54458.12%
▷ Public methods82488.03%
▷ Protected methods9410.04%
▷ Private methods181.92%
Functions86
▷ Named functions8295.35%
▷ Anonymous functions44.65%
Constants115
▷ Global constants6556.52%
▷ Class constants5043.48%
▷ Public constants50100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
24 PNG files occupy 1.01MB with 0.58MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-7.png94.35KB26.68KB▼ 71.72%
assets/screenshot-4.png66.72KB20.63KB▼ 69.08%
assets/images/star-half.png0.65KB0.65KB0.00%
assets/screenshot-6.png58.21KB17.68KB▼ 69.62%
assets/screenshot-3.png116.24KB25.25KB▼ 78.28%