78% wp-client-testimonial

Code Review | Client Testimonial Slider

WordPress plugin Client Testimonial Slider scored78%from 54 tests.

About plugin

  • Plugin page: wp-client-testimo...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Aug 1, 2015
  • Latest release: Jul 25, 2022
  • Number of updates: 40
  • Update frequency: every 63.8 days
  • Top authors: amu02aftab (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /3,167 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.83ms] Passed 4 tests

Server-side resources used by Client Testimonial Slider
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0637.61 ▲0.04
Dashboard /wp-admin3.37 ▲0.0648.09 ▼2.11
Posts /wp-admin/edit.php3.42 ▲0.0648.16 ▼1.68
Add New Post /wp-admin/post-new.php5.97 ▲0.0890.06 ▼11.55
Media Library /wp-admin/upload.php3.29 ▲0.0640.13 ▲5.54
New Testimonial /wp-admin/post-new.php?post_type=testimonials3.4046.10
Settings /wp-admin/edit.php?post_type=testimonials&page=testimonial-settings3.2633.52
All Testimonials /wp-admin/edit.php?post_type=testimonials3.3334.49

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Client Testimonial Slider
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲19213.84 ▼0.795.86 ▲4.2443.86 ▲4.07
Dashboard /wp-admin2,258 ▲705.18 ▲0.28103.39 ▼11.2840.70 ▼1.25
Posts /wp-admin/edit.php2,146 ▲572.29 ▲0.3040.81 ▲1.2434.11 ▼0.56
Add New Post /wp-admin/post-new.php1,556 ▲3623.29 ▲0.07641.52 ▼43.4136.22 ▼18.38
Media Library /wp-admin/upload.php1,443 ▲614.36 ▲0.13115.68 ▲15.0645.67 ▲1.75
New Testimonial /wp-admin/post-new.php?post_type=testimonials2,2567.86175.4961.51
Settings /wp-admin/edit.php?post_type=testimonials&page=testimonial-settings1,2222.4152.4825.22
All Testimonials /wp-admin/edit.php?post_type=testimonials1,1162.2733.9226.97

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/edit.php?post_type=testimonials&page=testimonial-settings
    • > Notice in wp-content/plugins/wp-client-testimonial/include/testimonial-settings.php+4
    Undefined index: testmonial_setting_submit
    • > GET request to /wp-admin/edit.php?post_type=testimonials&page=testimonial-settings
    • > Notice in wp-content/plugins/wp-client-testimonial/include/testimonial-settings.php+5
    Undefined index: main_box_bg_color
    • > GET request to /wp-admin/edit.php?post_type=testimonials&page=testimonial-settings
    • > Notice in wp-content/plugins/wp-client-testimonial/include/testimonial-settings.php+6
    Undefined index: all_text_color
    • > GET request to /wp-admin/edit.php?post_type=testimonials&page=testimonial-settings
    • > Notice in wp-content/plugins/wp-client-testimonial/include/testimonial-settings.php+7
    Undefined index: client_content_box_color
    • > GET request to /wp-admin/edit.php?post_type=testimonials&page=testimonial-settings
    • > Notice in wp-content/plugins/wp-client-testimonial/include/testimonial-settings.php+8
    Undefined index: testimonial_heading_text
    • > GET request to /wp-admin/edit.php?post_type=testimonials&page=testimonial-settings
    • > Notice in wp-content/plugins/wp-client-testimonial/include/testimonial-settings.php+9
    Undefined index: saved
    • > GET request to /wp-admin/edit.php?post_type=testimonials&page=testimonial-settings
    • > Notice in wp-content/plugins/wp-client-testimonial/include/testimonial-settings.php+31
    Undefined variable: message

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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/wp-client-testimonial/include/testimonial-settings.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Back end client testimonial list), #2 (Back end add client testimonial), #3 (Back end color settings), #4 (Frond end look of client testimonial)
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
The official readme.txt is a good inspiration

wp-client-testimonial/wp-client-testimonial.php Passed 13 tests

The main PHP script in "Client Testimonial Slider" version 2.0 is automatically included on every request by WordPress
114 characters long description:
Display client testimonial with slide previous and next features. And having different color settings from admin .

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
Good job! No executable or dangerous file extensions detected402 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP26135253
CSS1203126
JavaScript23223

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
4 PNG files occupy 0.34MB with 0.18MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png252.96KB70.37KB▼ 72.18%
screenshot-4.png48.75KB15.75KB▼ 67.70%
screenshot-1.png26.71KB15.94KB▼ 40.33%
screenshot-3.png20.40KB12.95KB▼ 36.50%