78% testimonial-moving

Code Review | Testimonial Moving

WordPress plugin Testimonial Moving scored78%from 54 tests.

About plugin

  • Plugin page: testimonial-moving
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 20, 2022
  • Latest release: Dec 24, 2022
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: shafiqul6171 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /469 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.51MB] [CPU: ▼0.79ms] Passed 4 tests

Analyzing server-side resources used by Testimonial Moving
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.4946.69 ▲7.16
Dashboard /wp-admin3.86 ▲0.5548.48 ▼5.23
Posts /wp-admin/edit.php3.91 ▲0.5552.53 ▲3.93
Add New Post /wp-admin/post-new.php6.40 ▲0.5197.35 ▼6.54
Media Library /wp-admin/upload.php3.72 ▲0.4840.68 ▲4.67
All templates /wp-admin/edit.php?post_type=testimonial_template3.7640.38
Add New /wp-admin/post-new.php?post_type=testimonial3.9353.23
All Testimonials /wp-admin/edit.php?post_type=testimonial3.7640.35
Add Template /wp-admin/post-new.php?post_type=testimonial_template3.7547.45
Settings /wp-admin/edit.php?post_type=testimonial&page=testimonial-moving3.6936.41

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 56 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_testimonial_moving_widget

Browser metrics Passed 4 tests

A check of browser resources used by Testimonial Moving
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,961 ▲20013.55 ▼0.8610.63 ▲8.8544.09 ▼1.31
Dashboard /wp-admin2,247 ▲705.64 ▲0.1190.61 ▼2.4342.27 ▲1.51
Posts /wp-admin/edit.php2,149 ▲522.04 ▲0.0839.89 ▼0.6436.89 ▼3.52
Add New Post /wp-admin/post-new.php1,570 ▲4223.11 ▼0.32661.18 ▲15.7754.97 ▲7.22
Media Library /wp-admin/upload.php1,452 ▲524.37 ▲0.19105.20 ▼2.5646.02 ▼0.50
All templates /wp-admin/edit.php?post_type=testimonial_template1,1201.9835.0332.46
Add New /wp-admin/post-new.php?post_type=testimonial2,7089.09198.7275.08
All Testimonials /wp-admin/edit.php?post_type=testimonial1,1641.9433.3629.70
Add Template /wp-admin/post-new.php?post_type=testimonial_template1,9432.5552.1866.49
Settings /wp-admin/edit.php?post_type=testimonial&page=testimonial-moving1,0652.0124.3846.45

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_testimonial_moving_widget

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
Please take a closer look at the following
  • 18× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/testimonial-moving/templates/onepig/single-testimonial.php
    • > /wp-content/plugins/testimonial-moving/public/partials/testimonial-moving-public-display.php
    • > /wp-content/plugins/testimonial-moving/templates/default/single-testimonial.php
    • > /wp-content/plugins/testimonial-moving/templates/longform/loop-testimonial.php
    • > /wp-content/plugins/testimonial-moving/admin/partials/testimonial-moving-admin-display.php
    • > /wp-content/plugins/testimonial-moving/templates/default/loop-testimonial.php
    • > /wp-content/plugins/testimonial-moving/templates/twopigs/loop-testimonial.php
    • > /wp-content/plugins/testimonial-moving/templates/fourpigs/single-testimonial.php
    • > /wp-content/plugins/testimonial-moving/templates/headlined/loop-testimonial.php
    • > /wp-content/plugins/testimonial-moving/templates/threepigs/single-testimonial.php
  • 161× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: has_image in wp-content/plugins/testimonial-moving/templates/twopigs/single-testimonial.php on line 8
    • > PHP Notice
      Undefined variable: show_microdata in wp-content/plugins/testimonial-moving/templates/threepigs/single-testimonial.php on line 56
    • > PHP Notice
      Undefined variable: rating in wp-content/plugins/testimonial-moving/templates/starrynight/loop-testimonial.php on line 8
    • > PHP Notice
      Undefined variable: rating in wp-content/plugins/testimonial-moving/templates/default/single-testimonial.php on line 23
    • > PHP Notice
      Undefined variable: has_image in wp-content/plugins/testimonial-moving/templates/onepig/loop-testimonial.php on line 5
    • > PHP Notice
      Undefined variable: show_microdata in wp-content/plugins/testimonial-moving/templates/headlined/single-testimonial.php on line 6
    • > PHP Notice
      Undefined variable: author_name in wp-content/plugins/testimonial-moving/templates/threepigs/loop-testimonial.php on line 52
    • > PHP Notice
      Undefined variable: show_title in wp-content/plugins/testimonial-moving/templates/starrynight/loop-testimonial.php on line 17
    • > PHP Notice
      Undefined variable: show_body in wp-content/plugins/testimonial-moving/templates/threepigs/loop-testimonial.php on line 44
    • > PHP Notice
      Undefined variable: slide_count in wp-content/plugins/testimonial-moving/templates/twopigs/loop-testimonial.php on line 92

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (Clean admin panel. Available only to those you want.), #2 (Simple moving settings.), #3 (Uses built-in WordPress functionality like excerpt, featured images and menu order.), #4 (A Testimonial moving inserted into a block of text with a shortcode.), #5 (Review data included, great for SEO.), #6 (Create your own custom templates.), #7 (Widget Options, override moving settings if needed.), #8 (Settings area where you can customize error handling and hide Font Awesome if you need to.)
  • Requires php: Invalid version format
You can take inspiration from this readme.txt

testimonial-moving/testimonial-moving.php Passed 13 tests

The main file in "Testimonial Moving" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
56 characters long description:
The best way to add testimonials to your WordPress site.

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 detected5,062 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP355578072,885
JavaScript43301501,700
CSS212840477

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity22.70
▷ Minimum class complexity1.00
▷ Maximum class complexity87.00
Average method complexity5.17
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods52
▷ Static methods35.77%
▷ Public methods4586.54%
▷ Protected methods00.00%
▷ Private methods713.46%
Functions20
▷ Named functions20100.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
8 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
templates/longform/icon.png6.52KB2.75KB▼ 57.78%
templates/default/icon.png19.92KB2.71KB▼ 86.39%
templates/twopigs/icon.png5.12KB2.25KB▼ 55.99%
templates/onepig/icon.png4.90KB2.16KB▼ 55.96%
templates/starrynight/icon.png13.74KB6.11KB▼ 55.56%