84% testimonial

Code Review | Testimonial Slider

WordPress plugin Testimonial Slider scored84%from 54 tests.

About plugin

  • Plugin page: testimonial
  • Plugin version: 2.0.12
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 21, 2014
  • Latest release: Apr 15, 2023
  • Number of updates: 83
  • Update frequency: every 37.8 days
  • Top authors: pickplugins (51.81%)paratheme (37.35%)wpkids (13.25%)

Code review

54 tests

User reviews

15 reviews

Install metrics

800+ active /39,354 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.14MB] [CPU: ▼1.15ms] Passed 4 tests

Analyzing server-side resources used by Testimonial Slider
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1242.22 ▼0.09
Dashboard /wp-admin3.48 ▲0.1849.53 ▲1.71
Posts /wp-admin/edit.php3.55 ▲0.2052.51 ▲8.48
Add New Post /wp-admin/post-new.php6.02 ▲0.1388.29 ▼6.28
Media Library /wp-admin/upload.php3.35 ▲0.1235.84 ▲0.06
Settings /wp-admin/edit.php?post_type=testimonial&page=testimonial_settings3.4038.27
All Testimonial /wp-admin/edit.php?post_type=testimonial3.4342.29
All Templates /wp-admin/edit.php?post_type=testimonial_template3.5647.74
Add New /wp-admin/post-new.php?post_type=testimonial3.5350.23

Server storage [IO: ▲3.62MB] [DB: ▲0.02MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 67 new files
Database: no new tables, 7 new options
New WordPress options
testimonial_plugin_info
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Testimonial Slider
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,021 ▲26418.20 ▲3.831.74 ▼0.2442.71 ▲0.84
Dashboard /wp-admin2,424 ▲2368.73 ▲2.87187.80 ▲72.2342.14 ▼1.44
Posts /wp-admin/edit.php2,476 ▲3876.00 ▲3.97116.68 ▲78.3435.17 ▼0.26
Add New Post /wp-admin/post-new.php1,566 ▲2019.14 ▲0.79722.45 ▲112.5437.99 ▼28.68
Media Library /wp-admin/upload.php1,619 ▲2316.45 ▲2.28140.55 ▲43.6045.25 ▼0.28
Settings /wp-admin/edit.php?post_type=testimonial&page=testimonial_settings1,3826.03117.6939.41
All Testimonial /wp-admin/edit.php?post_type=testimonial1,4405.8968.4427.50
All Templates /wp-admin/edit.php?post_type=testimonial_template2,6145.9969.6428.95
Add New /wp-admin/post-new.php?post_type=testimonial3,5606.84121.4145.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • testimonial_plugin_info
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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 take a look at the following user-side issues
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=testimonial_template
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-codemirror,underscore,code-editor,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).Lazy is not a function" "TypeError: $(...).Lazy is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/testimonial/assets/settings-tabs/settings-tabs.js?ver=6.3.1:311:20)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-codemirror,underscore,code-editor,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-codemirror,underscore,code-editor,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=testimonial_template
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-codemirror,underscore,code-editor,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: $(...).Lazy is not a function
    • > GET request to /wp-admin/post-new.php?post_type=testimonial
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,underscore,wp-codemirror,code-editor,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).Lazy is not a function" "TypeError: $(...).Lazy is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/testimonial/assets/settings-tabs/settings-tabs.js?ver=6.3.1:311:20)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,underscore,wp-codemirror,code-editor,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,underscore,wp-codemirror,code-editor,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=testimonial
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,underscore,wp-codemirror,code-editor,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: $(...).Lazy is not a function

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Screenshots: These screenshots lack descriptions #10, #11, #3, #4, #9 in testimonial/assets to your readme.txt
You can look at the official readme.txt

testimonial/testimonial.php Passed 13 tests

The principal PHP file in "Testimonial Slider" v. 2.0.12 is loaded by WordPress automatically on each request
53 characters long description:
Display testimonial and reviews in a carousel slider.

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 detected18,279 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
SVG4009,131
PHP182,6241595,244
CSS61,714703,724
JavaScript211330180

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity111.33
▷ Minimum class complexity1.00
▷ Maximum class complexity641.00
Average method complexity14.79
▷ Minimum method complexity1.00
▷ Maximum method complexity73.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods48
▷ Static methods00.00%
▷ Public methods48100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions56
▷ Named functions56100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
19 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/images/navThemes5.png2.45KB1.26KB▼ 48.44%
assets/admin/images/profile.png2.48KB1.89KB▼ 23.68%
assets/admin/images/navThemes7.png1.27KB0.46KB▼ 64.07%
assets/admin/images/dotsThemes2.png0.65KB0.20KB▼ 69.97%
assets/admin/images/dotsThemes4.png0.66KB0.20KB▼ 68.95%