10% sas-web-testimonials-slider

Code Review | SAS WEB Testimonials Slider

WordPress plugin SAS WEB Testimonials Slider scored10%from 54 tests.

About plugin

  • Plugin page: sas-web-testimoni...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 22, 2015
  • Latest release: Sep 9, 2017
  • Number of updates: 12
  • Update frequency: every 65.0 days
  • Top authors: sureshHARDIYA (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,255 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/sas-web-testimonials-slider/lib/widgets.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; widget_testimonials has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼51.61ms] Passed 4 tests

A check of server-side resources used by SAS WEB Testimonials Slider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.12 ▼1.394.63 ▼35.66
Dashboard /wp-admin2.14 ▼1.216.33 ▼43.49
Posts /wp-admin/edit.php2.14 ▼1.266.16 ▼41.90
Add New Post /wp-admin/post-new.php2.14 ▼3.797.89 ▼85.40
Media Library /wp-admin/upload.php2.14 ▼1.136.22 ▼28.36
Testimonial Categories /wp-admin/edit-tags.php?taxonomy=testimonial_category&post_type=testimonial2.149.25
Testimonials /wp-admin/edit.php?post_type=testimonial2.146.58
Add New /wp-admin/post-new.php?post_type=testimonial2.147.17

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_widget_testimonials
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for SAS WEB Testimonials Slider
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲7714.15 ▼0.202.85 ▲1.2639.28 ▼4.43
Dashboard /wp-admin2,235 ▲585.66 ▲0.1191.29 ▲3.4341.29 ▼2.69
Posts /wp-admin/edit.php2,137 ▲372.02 ▲0.0341.66 ▲5.1444.78 ▲5.09
Add New Post /wp-admin/post-new.php1,557 ▲2223.16 ▲4.95646.46 ▲38.4469.03 ▲9.52
Media Library /wp-admin/upload.php1,437 ▲404.28 ▲0.0297.11 ▼6.6445.85 ▲0.43
Testimonial Categories /wp-admin/edit-tags.php?taxonomy=testimonial_category&post_type=testimonial1,3082.1230.8534.12
Testimonials /wp-admin/edit.php?post_type=testimonial1,1251.9631.4033.99
Settings /wp-admin/sasweb-testimonials.php260.420.0813.71
Add New /wp-admin/post-new.php?post_type=testimonial1,7853.5263.3636.08

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/sas-web-testimonials-slider/lib/widgets.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; widget_testimonials has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_widget_testimonials
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=testimonial
    • > Deprecated in wp-content/plugins/sas-web-testimonials-slider/lib/widgets.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; widget_testimonials has a deprecated constructor
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=testimonial
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in widget_testimonials is deprecated since version 4.3.0! Use __construct() instead.

SRP 0% 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/sas-web-testimonials-slider/sasweb-testimonials.php
  • 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/sas-web-testimonials-slider/lib/widgets.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/sas-web-testimonials-slider/lib/shortcode.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/sasweb-testimonials.php
    • > Network (severe)
    wp-admin/sasweb-testimonials.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (testimonial_settings.png), #2 (widget_area.png), #3 (testimonial_body.png)
You can look at the official readme.txt

sas-web-testimonials-slider/sasweb-testimonials.php 92% from 13 tests

Analyzing the main PHP file in "SAS WEB Testimonials Slider" version 1.2
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("sas-web-testimonials-slider.php" instead of "sasweb-testimonials.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected741 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP410163492
CSS24011198
JavaScript271351

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity8.75
▷ Minimum class complexity2.00
▷ Maximum class complexity15.00
Average method complexity2.48
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods21
▷ Static methods14.76%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
5 PNG files occupy 0.25MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
widget_area.png34.76KB10.31KB▼ 70.33%
assets/img/controls.png2.74KB1.42KB▼ 48.29%
testimonial_body.png141.06KB50.25KB▼ 64.37%
images/controls.png2.74KB1.42KB▼ 48.29%
testimonial_settings.png74.74KB23.64KB▼ 68.37%