62% sanchari-testimonial

Code Review | Sanchari Testimonial

WordPress plugin Sanchari Testimonial scored62%from 54 tests.

About plugin

  • Plugin page: sanchari-testimonial
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.2
  • WordPress version: 6.3.1
  • First release: Aug 23, 2014
  • Latest release: Aug 23, 2014
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: arnabkumar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /685 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼1.90MB] [CPU: ▼59.71ms] Passed 4 tests

Analyzing server-side resources used by Sanchari Testimonial
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.384.95 ▼45.94
Dashboard /wp-admin2.11 ▼1.206.68 ▼51.09
Posts /wp-admin/edit.php2.11 ▼1.255.65 ▼47.17
Add New Post /wp-admin/post-new.php2.11 ▼3.787.98 ▼94.63
Media Library /wp-admin/upload.php2.11 ▼1.139.10 ▼33.62
Testimonial /wp-admin/edit.php?post_type=sanchari_testimonial2.116.50
Testimonial Category /wp-admin/edit-tags.php?taxonomy=testimonial_cat&post_type=sanchari_testimonial2.116.77
Sanchari Testimonial /wp-admin/options-general.php?page=sanchari_testimonial_options_page2.117.21
Add New /wp-admin/post-new.php?post_type=sanchari_testimonial2.115.62

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Sanchari Testimonial
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,144 ▲39815.52 ▲0.767.17 ▲5.0154.44 ▼2.96
Dashboard /wp-admin2,412 ▲2276.64 ▲1.71142.56 ▲13.0942.54 ▼9.66
Posts /wp-admin/edit.php2,318 ▲2233.64 ▲1.6768.65 ▲23.3035.29 ▼4.65
Add New Post /wp-admin/post-new.php1,586 ▲6621.39 ▼1.75684.10 ▼73.5438.21 ▼20.73
Media Library /wp-admin/upload.php1,454 ▲664.24 ▲0.08103.23 ▼35.8750.73 ▼16.33
Testimonial /wp-admin/edit.php?post_type=sanchari_testimonial1,2873.5254.3431.55
Testimonial Category /wp-admin/edit-tags.php?taxonomy=testimonial_cat&post_type=sanchari_testimonial1,4913.3561.0633.25
Sanchari Testimonial /wp-admin/options-general.php?page=sanchari_testimonial_options_page2,1723.98134.4365.21
Add New /wp-admin/post-new.php?post_type=sanchari_testimonial2,5168.24230.0484.72

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the owl-carousel-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • sanchari_basics
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=sanchari_testimonial
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the owl-carousel-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=sanchari_testimonial
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the font-awesome-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=sanchari_testimonial
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the owl-carousel-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=sanchari_testimonial
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the owl-transitions-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=sanchari_testimonial
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the custom-owl-theme-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=sanchari_testimonial
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the testimonial-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=sanchari_testimonial
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the my-mce-botton-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=sanchari_testimonial
    • > Warning in wp-content/plugins/sanchari-testimonial/inc/cmb/init.php+746
    count(): Parameter must be an array or an object that implements Countable
  • 136 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=sanchari_testimonial
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
    Undefined offset: 0
  • 136 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=sanchari_testimonial
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
    Trying to get property 'guid' of non-object
  • 544 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=sanchari_testimonial
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+221
    Trying to get property 'ID' of non-object
  • 136 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=sanchari_testimonial
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
    Trying to get property 'post_title' of non-object

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/sanchari-testimonial/inc/cmb/tests/phpunit/includes/bootstrap.php
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/sanchari-testimonial/inc/cmb/tests/phpunit/tests/CMB_Core_Test.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sanchari-testimonial/js/options_js.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sanchari-testimonial/sanchari-testimonial.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/sanchari-testimonial/inc/custom_meta_box.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/sanchari-testimonial/inc/cmb/init.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/sanchari-testimonial/inc/cmb/example-functions.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sanchari-testimonial/inc/class.settings-api.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sanchari-testimonial/css/style.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Contributors: Plugin contributors not specified
The official readme.txt is a good inspiration

sanchari-testimonial/sanchari-testimonial.php 92% from 13 tests

The entry point to "Sanchari Testimonial" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 238 characters long)

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
There were no executable files found in this plugin9,558 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript75194203,564
PHP157711,2852,616
CSS892562,461
SVG100504
Markdown3880288
Bourne Shell115459
JSON10031
YAML15018
XML10117

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity49.56
▷ Minimum class complexity1.00
▷ Maximum class complexity136.00
Average method complexity3.65
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods165
▷ Static methods3420.61%
▷ Public methods16398.79%
▷ Protected methods21.21%
▷ Private methods00.00%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/cmb/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
inc/cmb/images/ico-delete.png0.70KB0.72KB0.00%
inc/cmb/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
inc/cmb/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
inc/cmb/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%