74% website-testimonials

Code Review | Divi Testimonial Plus

WordPress plugin Divi Testimonial Plus scored74%from 54 tests.

About plugin

  • Plugin page: website-testimonials
  • Plugin version: 6.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3
  • WordPress version: 6.3.1
  • First release: Feb 8, 2023
  • Latest release: Aug 28, 2023
  • Number of updates: 6
  • Update frequency: every 34.3 days
  • Top authors: wpt00ls (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /770 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.61MB] [CPU: ▼1.59ms] Passed 4 tests

Server-side resources used by Divi Testimonial Plus
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.08 ▲0.6244.07 ▼0.53
Dashboard /wp-admin3.95 ▲0.6158.84 ▼4.26
Posts /wp-admin/edit.php4.00 ▲0.6553.29 ▲0.25
Add New Post /wp-admin/post-new.php6.47 ▲0.5894.57 ▼1.82
Media Library /wp-admin/upload.php3.88 ▲0.6542.73 ▲3.33
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins4.0942.33
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius4.0741.36
Divi Testimonials /wp-admin/options-general.php?page=wpt-divi-testimonials3.9544.78

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 309 new files
Database: no new tables, 9 new options
New WordPress options
fs_active_plugins
widget_theysaidso_widget
fs_accounts
db_upgraded
can_compress_scripts
widget_recent-posts
fs_debug_mode
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Divi Testimonial Plus: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,879 ▲9314.36 ▼0.011.78 ▲0.0732.85 ▼9.04
Dashboard /wp-admin2,247 ▲705.52 ▼0.1590.34 ▼2.6649.89 ▲10.57
Posts /wp-admin/edit.php2,161 ▲612.15 ▲0.1637.88 ▲0.8142.23 ▲11.12
Add New Post /wp-admin/post-new.php1,560 ▲3422.93 ▼0.38641.42 ▼28.3262.60 ▲1.35
Media Library /wp-admin/upload.php1,460 ▲634.31 ▲0.1299.54 ▼5.5950.43 ▲0.82
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins1,1811.7728.4236.65
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0981.7425.3728.23
Divi Testimonials /wp-admin/options-general.php?page=wpt-divi-testimonials1,1901.9029.8561.65

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/website-testimonials/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • fs_debug_mode
    • fs_active_plugins
    • can_compress_scripts
    • fs_accounts

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 26× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/website-testimonials/vendor/pimple/pimple/src/Pimple/Tests/Psr11/ServiceLocatorTest.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/website-testimonials/includes/lib/TGM-Plugin-Activation-2.6.1/class-tgm-plugin-activation.php:2176
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/website-testimonials/resources/views/admin_menu/settings_submenu.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/website-testimonials/resources/views/divi/modules/testimonials-carousel.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'Pimple\\ServiceProviderInterface' not found in wp-content/plugins/website-testimonials/vendor/pimple/pimple/src/Pimple/Tests/Fixtures/PimpleServiceProvider.php:32
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\otFoundExceptionInterface' not found in wp-content/plugins/website-testimonials/vendor/pimple/pimple/src/Pimple/Exception/UnknownIdentifierException.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'WPT\\WebsiteTestimonials\\Divi\\Modules\\BaseModule' not found in wp-content/plugins/website-testimonials/includes/classes/Divi/Modules/TestimonialsList/Module.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/website-testimonials/vendor/pimple/pimple/src/Pimple/Exception/FrozenServiceException.php:36
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/website-testimonials/vendor/pimple/pimple/src/Pimple/Exception/ExpectedInvokableException.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/website-testimonials/vendor/pimple/pimple/src/Pimple/Tests/PimpleTest.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: testimonial grid, divi testimonial slider, divi testimonial form, testimonials divi, divi testimonials...

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

The principal PHP file in "Divi Testimonial Plus" v. 6.1.4 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected45,543 lines of code in 237 files:
LanguageFilesBlank linesComment linesLines of code
PHP1819,04720,27739,188
PO File171,4491,9934,842
Markdown51900786
JavaScript96574365
JSON300174
reStructuredText19613997
YAML17139
SVG30020
CSS1611116
XML12016

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity48.01
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.26
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces20
Interfaces4
Traits0
Classes101
▷ Abstract classes21.98%
▷ Concrete classes9998.02%
▷ Final classes22.02%
Methods1,582
▷ Static methods22113.97%
▷ Public methods1,16873.83%
▷ Protected methods402.53%
▷ Private methods37423.64%
Functions168
▷ Named functions10461.90%
▷ Anonymous functions6438.10%
Constants148
▷ Global constants9866.22%
▷ Class constants5033.78%
▷ Public constants50100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and 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
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/website-testimonials.png2.96KB1.97KB▼ 33.31%