73% easy-testimonials

Code Review | Easy Testimonials

WordPress plugin Easy Testimonials scored 73% from 54 tests.

About plugin

  • Plugin page: easy-testimonials
  • Plugin version: 3.9.5
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jul 1, 2013
  • Latest release: Mar 9, 2023
  • Number of updates: 231
  • Update frequency: every 15.3 days
  • Top authors: richardgabriel (95.67%)ghuger (4.76%)

Code review

54 tests

User reviews

87 reviews

Install metrics

20,000+ active / 1,152,948 total downloads

Benchmarks

Plugin footprint 83% 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: ▲1.78MB] [CPU: ▲59.78ms] Passed 4 tests

A check of server-side resources used by Easy Testimonials
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.19 ▲1.7395.79 ▲54.57
Dashboard /wp-admin5.10 ▲1.79102.27 ▲54.49
Posts /wp-admin/edit.php5.16 ▲1.80115.34 ▲67.74
Add New Post /wp-admin/post-new.php7.77 ▲1.88164.05 ▲73.77
Media Library /wp-admin/upload.php5.03 ▲1.8095.47 ▲62.33
About Plugin /wp-admin/admin.php?page=easy-testimonials-settings_aloha4.9484.62
Display Settings /wp-admin/edit.php?post_type=testimonial&page=easy-testimonials-display-settings5.0099.93
Theme Settings /wp-admin/edit.php?post_type=testimonial&page=easy-testimonials-style-settings4.9788.81
Import & Export /wp-admin/edit.php?post_type=testimonial&page=easy-testimonials-import-export-settings4.9791.87
Error /wp-admin/admin.php?page=easy_testimonials_pro_error_page4.9385.72
Upgrade To Pro /wp-admin/edit.php?post_type=testimonial&page=easy-testimonials-upgrade-to-pro4.9485.89
Testimonial Category /wp-admin/edit-tags.php?taxonomy=easy-testimonial-category&post_type=testimonial5.01109.67
Shortcode Generator /wp-admin/edit.php?post_type=testimonial&page=easy-testimonials-shortcode-generator5.0893.77
Collection Form Settings /wp-admin/edit.php?post_type=testimonial&page=easy-testimonials-submission-settings5.13101.90
Testimonial Forms /wp-admin/edit.php?post_type=testimonial&page=easy-testimonials-testmionial-forms4.9688.52

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 193 new files
Database: no new tables, 16 new options
New WordPress options
widget_cycledtestimonialwidget
widget_listtestimonialswidget
theysaidso_admin_options
widget_theysaidso_widget
easy_testimonials_maintenance_version
easy_t_fallback_image_method
widget_singletestimonialwidget
widget_recent-comments
ezt_has_generated_examples
db_upgraded
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Testimonials
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,018 ▲28314.14 ▼0.516.83 ▲4.8840.79 ▼7.75
Dashboard /wp-admin2,290 ▲1015.30 ▼0.58117.65 ▼12.3746.36 ▲3.27
Posts /wp-admin/edit.php2,179 ▲902.37 ▲0.3337.68 ▼0.1335.56 ▲2.25
Add New Post /wp-admin/post-new.php1,622 ▲10822.31 ▲4.69658.76 ▼27.6037.40 ▼20.73
Media Library /wp-admin/upload.php1,577 ▲1864.79 ▲0.59105.55 ▲9.2541.35 ▼2.88
About Plugin /wp-admin/admin.php?page=easy-testimonials-settings_aloha8952.3133.4526.84
Display Settings /wp-admin/edit.php?post_type=testimonial&page=easy-testimonials-display-settings1,7992.4952.9052.71
Theme Settings /wp-admin/edit.php?post_type=testimonial&page=easy-testimonials-style-settings1,3442.3550.1361.65
Import & Export /wp-admin/edit.php?post_type=testimonial&page=easy-testimonials-import-export-settings1,1282.5347.6448.01
Error /wp-admin/admin.php?page=easy_testimonials_pro_error_page8532.0228.8724.47
Upgrade To Pro /wp-admin/edit.php?post_type=testimonial&page=easy-testimonials-upgrade-to-pro1,57713.44297.3592.08
Testimonial Category /wp-admin/edit-tags.php?taxonomy=easy-testimonial-category&post_type=testimonial1,3592.1631.2728.54
Shortcode Generator /wp-admin/edit.php?post_type=testimonial&page=easy-testimonials-shortcode-generator1,4063.7357.9630.70
Collection Form Settings /wp-admin/edit.php?post_type=testimonial&page=easy-testimonials-submission-settings1,9992.5860.3248.56
Testimonial Forms /wp-admin/edit.php?post_type=testimonial&page=easy-testimonials-testmionial-forms9952.2632.6733.68

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 16 options in the database
    • easy_testimonials_maintenance_tasks_run
    • can_compress_scripts
    • widget_singletestimonialwidget
    • ezt_has_generated_examples
    • theysaidso_admin_options
    • widget_randomtestimonialwidget
    • widget_recent-comments
    • db_upgraded
    • widget_cycledtestimonialwidget
    • widget_theysaidso_widget
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=testimonial&page=easy-testimonials-style-settings
    • > POST request to /wp-admin/admin-ajax.php
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'easyTestimonialThemeOptions' does not have a method 'allow_display_in_style'

SRP 50% 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
Please fix the following
  • 36× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: output_theme in wp-content/plugins/easy-testimonials/include/templates/single_testimonial-ribbon_style.php on line 3
    • > PHP Notice
      Undefined variable: output_theme in wp-content/plugins/easy-testimonials/include/templates/single_testimonial-accolades_style.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/easy-testimonials/include/widgets/testimonial_cycle_widget.php:21
    • > PHP Notice
      Undefined variable: output_theme in wp-content/plugins/easy-testimonials/include/templates/single_testimonial-merit_style.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/easy-testimonials/include/widgets/single_testimonial_widget.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'easyTestimonialOptions' not found in wp-content/plugins/easy-testimonials/include/settings/display.options.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'easyTestimonialOptions' not found in wp-content/plugins/easy-testimonials/include/settings/theme.options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/easy-testimonials/include/translate_strings.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/easy-testimonials/include/widgets/random_testimonial_widget.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/easy-testimonials/include/maintenance/maintenance.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/edit.php?post_type=testimonial&page=easy-testimonials-style-settings
    • > Javascript (severe) in unknown
    /wp-admin/edit.php?post_type=testimonial&page=easy-testimonials-style-settings 2:15 Uncaught SyntaxError: Unexpected token ':'

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: testimonial feed, testimonials, random testimonials, testimonial widget

easy-testimonials/easy-testimonials.php Passed 13 tests

The entry point to "Easy Testimonials" version 3.9.5 is a PHP file that has certain tags in its header comment area
115 characters long description:
Easy Testimonials - Provides custom post type, shortcode, sidebar widget, and other functionality for testimonials.

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 plugin32,988 lines of code in 118 files:
LanguageFilesBlank linesComment linesLines of code
PHP451,7903,07811,321
CSS246772105,757
PO File191,5012,0634,988
SVG4033,453
JavaScript184153773,361
JSON1002,601
HTML44041,142
Markdown3900365

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity35.70
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity4.07
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes37
▷ Abstract classes00.00%
▷ Concrete classes37100.00%
▷ Final classes00.00%
Methods418
▷ Static methods51.20%
▷ Public methods39293.78%
▷ Protected methods235.50%
▷ Private methods30.72%
Functions19
▷ Named functions1894.74%
▷ Anonymous functions15.26%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
23 PNG files occupy 0.25MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
include/assets/img/pro-upgrade.png5.35KB2.36KB▼ 55.88%
include/assets/img/polygon-2.png1.06KB0.21KB▼ 79.91%
include/assets/img/mystery-person.png1.74KB0.84KB▼ 51.93%
include/assets/img/mystery_man.png1.74KB0.84KB▼ 51.93%
include/lib/BikeShed/chosen/chosen-sprite@2x.png0.72KB0.83KB0.00%