78% sm-testimonial-slider

Code Review | SM Testimonial Slider

WordPress plugin SM Testimonial Slider scored78%from 54 tests.

About plugin

  • Plugin page: sm-testimonial-sl...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3
  • WordPress version: 6.3.1
  • First release: Nov 1, 2019
  • Latest release: Nov 19, 2019
  • Number of updates: 5
  • Update frequency: every 3.8 days
  • Top authors: mehtashail (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /465 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.81ms] Passed 4 tests

A check of server-side resources used by SM Testimonial Slider
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0637.57 ▲2.26
Dashboard /wp-admin3.36 ▲0.0246.61 ▼10.90
Posts /wp-admin/edit.php3.41 ▲0.0641.97 ▼10.43
Add New Post /wp-admin/post-new.php5.95 ▲0.0681.40 ▼4.16
Media Library /wp-admin/upload.php3.29 ▲0.0640.36 ▲7.37
All Testimonials /wp-admin/edit.php?post_type=testimonials3.3333.86
shortcode /wp-admin/edit.php?post_type=testimonials&page=shortcode3.2530.85
Add Testimonial /wp-admin/post-new.php?post_type=testimonials3.4044.46

Server storage [IO: ▲0.09MB] [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: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by SM Testimonial Slider
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,858 ▲9714.11 ▼0.065.08 ▲3.4543.92 ▲4.19
Dashboard /wp-admin2,226 ▲455.62 ▼0.0082.41 ▼13.6735.03 ▼7.26
Posts /wp-admin/edit.php2,131 ▲311.95 ▼0.0534.39 ▼5.2434.36 ▼3.09
Add New Post /wp-admin/post-new.php1,552 ▲2323.26 ▲0.26673.64 ▼22.2352.26 ▼37.70
Media Library /wp-admin/upload.php1,431 ▲314.10 ▼0.11110.32 ▲4.3444.58 ▼1.48
All Testimonials /wp-admin/edit.php?post_type=testimonials1,1191.9730.0427.86
shortcode /wp-admin/edit.php?post_type=testimonials&page=shortcode7982.0323.4926.55
Add Testimonial /wp-admin/post-new.php?post_type=testimonials2,2477.60162.7562.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/sm-testimonial-slider/sm-testimonials.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/sm-testimonial-slider/inc/base/sm-testimonials-slider.php:16

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === sm-testimonial-slider === )
The official readme.txt might help

sm-testimonial-slider/sm-testimonials.php 85% from 13 tests

The primary PHP file in "SM Testimonial Slider" version 1.0.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("sm-testimonial-slider.php" instead of "sm-testimonials.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected351 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP48234280
CSS20270
JavaScript1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity6.50
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods1173.33%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png5.81KB2.73KB▼ 52.94%