10% ot-testimonial-widget

Code Review | Testimonial Widget

WordPress plugin Testimonial Widget scored10%from 54 tests.

About plugin

  • Plugin page: ot-testimonial-wi...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.5
  • WordPress version: 6.3.1
  • First release: Sep 13, 2017
  • Latest release: Apr 19, 2018
  • Number of updates: 7
  • Update frequency: every 31.3 days
  • Top authors: caselock (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /879 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/ot-testimonial-widget/functions.php+98
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.77MB] [CPU: ▼61.29ms] Passed 4 tests

A check of server-side resources used by Testimonial Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.23 ▼1.235.39 ▼42.20
Dashboard /wp-admin2.25 ▼1.096.92 ▼58.57
Posts /wp-admin/edit.php2.25 ▼1.106.76 ▼46.00
Add New Post /wp-admin/post-new.php2.25 ▼3.636.55 ▼98.37
Media Library /wp-admin/upload.php2.25 ▼0.987.07 ▼29.79
Testimonials /wp-admin/admin.php?page=ottestimonial2.257.64
Categories /wp-admin/admin.php?page=ottestimonial_category2.257.98

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
widget_ottesti_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Testimonial Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,033 ▲27214.86 ▲0.515.63 ▲3.6647.26 ▲3.14
Dashboard /wp-admin2,359 ▲1796.14 ▲0.51115.47 ▲14.9284.14 ▲36.54
Posts /wp-admin/edit.php2,287 ▲1873.41 ▲1.4648.07 ▲6.9776.75 ▲43.65
Add New Post /wp-admin/post-new.php1,547 ▲1823.23 ▲0.17624.28 ▼83.40191.31 ▲131.82
Media Library /wp-admin/upload.php1,427 ▲274.02 ▼0.2079.48 ▼19.0190.99 ▲50.04
Testimonials /wp-admin/admin.php?page=ottestimonial1,4033.2043.1061.79
Categories /wp-admin/admin.php?page=ottestimonial_category1,2263.0638.9069.67

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
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/ot-testimonial-widget/functions.php+98
    Array and string offset access syntax with curly braces is deprecated
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_ottesti_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ottestimonial_category
    • > Deprecated in wp-content/plugins/ot-testimonial-widget/functions.php+98
    Array and string offset access syntax with curly braces is deprecated
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ottestimonial_category
    • > Deprecated in wp-content/plugins/ot-testimonial-widget/functions.php+3
    Function create_function() is deprecated
    • > GET request to /wp-admin/admin.php?page=ottestimonial
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
    • > GET request to /wp-admin/admin.php?page=ottestimonial
    • > Notice in wp-content/plugins/ot-testimonial-widget/ot-testimonial.php+317
    Undefined index: description
    • > GET request to /wp-admin/admin.php?page=ottestimonial
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(http://www.patriarchia.ru/bu/2024-12-04/print.html): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found

    • > GET request to /wp-admin/admin.php?page=ottestimonial
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(): I/O warning : failed to load external entity "http://www.patriarchia.ru/bu/2024-12-04/print.html"
  • 32 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ottestimonial_category
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+46
    error_log(wp-content/plugins/bg-patriarchia-bu/inc/pbu2023.log): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=ottestimonial
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(http://www.patriarchia.ru/bu/2024-12-05/print.html): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found

    • > GET request to /wp-admin/admin.php?page=ottestimonial
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(): I/O warning : failed to load external entity "http://www.patriarchia.ru/bu/2024-12-05/print.html"
    • > GET request to /wp-admin/admin.php?page=ottestimonial
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(http://www.patriarchia.ru/bu/2024-12-06/print.html): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found

    • > GET request to /wp-admin/admin.php?page=ottestimonial
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(): I/O warning : failed to load external entity "http://www.patriarchia.ru/bu/2024-12-06/print.html"
    • > GET request to /wp-admin/admin.php?page=ottestimonial
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(http://www.patriarchia.ru/bu/2024-12-07/print.html): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found

    • > GET request to /wp-admin/admin.php?page=ottestimonial
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(): I/O warning : failed to load external entity "http://www.patriarchia.ru/bu/2024-12-07/print.html"
    • > GET request to /wp-admin/admin.php?page=ottestimonial
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(http://www.patriarchia.ru/bu/2024-12-08/print.html): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found

    • > GET request to /wp-admin/admin.php?page=ottestimonial
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(): I/O warning : failed to load external entity "http://www.patriarchia.ru/bu/2024-12-08/print.html"
    • > GET request to /wp-admin/admin.php?page=ottestimonial
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(http://www.patriarchia.ru/bu/2024-12-09/print.html): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found

    • > GET request to /wp-admin/admin.php?page=ottestimonial
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(): I/O warning : failed to load external entity "http://www.patriarchia.ru/bu/2024-12-09/print.html"
    • > GET request to /wp-admin/admin.php?page=ottestimonial
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(http://www.patriarchia.ru/bu/2024-12-10/print.html): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found

    • > GET request to /wp-admin/admin.php?page=ottestimonial
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(): I/O warning : failed to load external entity "http://www.patriarchia.ru/bu/2024-12-10/print.html"
    • > GET request to /wp-admin/admin.php?page=ottestimonial
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(http://www.patriarchia.ru/bu/2024-12-11/print.html): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found

    • > GET request to /wp-admin/admin.php?page=ottestimonial
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(): I/O warning : failed to load external entity "http://www.patriarchia.ru/bu/2024-12-11/print.html"
    • > GET request to /wp-admin/admin.php?page=ottestimonial_category
    • > Warning in wp-content/plugins/ot-testimonial-widget/ot-testimonial-category.php+233
    Use of undefined constant CHILD_IMG - assumed 'CHILD_IMG' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=ottestimonial_category
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(http://www.patriarchia.ru/bu/2024-12-12/print.html): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found

    • > GET request to /wp-admin/admin.php?page=ottestimonial_category
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(): I/O warning : failed to load external entity "http://www.patriarchia.ru/bu/2024-12-12/print.html"
    • > GET request to /wp-admin/admin.php?page=ottestimonial_category
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(http://www.patriarchia.ru/bu/2024-12-13/print.html): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found

    • > GET request to /wp-admin/admin.php?page=ottestimonial_category
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(): I/O warning : failed to load external entity "http://www.patriarchia.ru/bu/2024-12-13/print.html"
    • > GET request to /wp-admin/admin.php?page=ottestimonial_category
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(http://www.patriarchia.ru/bu/2024-12-14/print.html): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found

    • > GET request to /wp-admin/admin.php?page=ottestimonial_category
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(): I/O warning : failed to load external entity "http://www.patriarchia.ru/bu/2024-12-14/print.html"
    • > GET request to /wp-admin/admin.php?page=ottestimonial_category
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(http://www.patriarchia.ru/bu/2024-12-15/print.html): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found

    • > GET request to /wp-admin/admin.php?page=ottestimonial_category
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(): I/O warning : failed to load external entity "http://www.patriarchia.ru/bu/2024-12-15/print.html"
    • > GET request to /wp-admin/admin.php?page=ottestimonial_category
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(http://www.patriarchia.ru/bu/2024-12-16/print.html): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found

    • > GET request to /wp-admin/admin.php?page=ottestimonial_category
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(): I/O warning : failed to load external entity "http://www.patriarchia.ru/bu/2024-12-16/print.html"
    • > GET request to /wp-admin/admin.php?page=ottestimonial_category
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(http://www.patriarchia.ru/bu/2024-12-17/print.html): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found

    • > GET request to /wp-admin/admin.php?page=ottestimonial_category
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(): I/O warning : failed to load external entity "http://www.patriarchia.ru/bu/2024-12-17/print.html"
    • > GET request to /wp-admin/admin.php?page=ottestimonial_category
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(http://www.patriarchia.ru/bu/2024-12-18/print.html): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found

    • > GET request to /wp-admin/admin.php?page=ottestimonial_category
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(): I/O warning : failed to load external entity "http://www.patriarchia.ru/bu/2024-12-18/print.html"
    • > GET request to /wp-admin/admin.php?page=ottestimonial_category
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(http://www.patriarchia.ru/bu/2024-12-19/print.html): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found

    • > GET request to /wp-admin/admin.php?page=ottestimonial_category
    • > POST request to /wp-cron.php?doing_wp_cron=1697573451.3645250797271728515625
    • > Warning in wp-content/plugins/bg-patriarchia-bu/inc/upload.php+53
    DOMDocument::loadHTMLFile(): I/O warning : failed to load external entity "http://www.patriarchia.ru/bu/2024-12-19/print.html"

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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ot-testimonial-widget/functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ottesti_e() in wp-content/plugins/ot-testimonial-widget/ot-testimonial-options.php:3

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)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: testimonial, widget, testimonial widget

ot-testimonial-widget/ot-testimonial.php 92% from 13 tests

This is the main PHP file of "Testimonial Widget" version 1.2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("ot-testimonial-widget.php" instead of "ot-testimonial.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin6,419 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript35682844,651
PHP5161471,426
CSS1291342

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity17.33
▷ Minimum class complexity9.00
▷ Maximum class complexity22.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods33
▷ Static methods00.00%
▷ Public methods33100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/testimonial.png8.54KB2.96KB▼ 65.34%
images/help_icon.png2.22KB1.67KB▼ 24.66%
images/quote-before.png1.08KB0.24KB▼ 77.72%
images/carousel_nav.png2.01KB1.71KB▼ 15.28%
images/icon_1.png0.67KB0.82KB0.00%