10% testimonials-creator

Code Review | Testimonials Creator

WordPress plugin Testimonials Creator scored10%from 54 tests.

About plugin

  • Plugin page: testimonials-creator
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.3
  • WordPress version: 6.3.1
  • First release: Sep 3, 2016
  • Latest release: Mar 20, 2017
  • Number of updates: 18
  • Update frequency: every 11.0 days
  • Top authors: adoncreatives (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

60+ active /2,738 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/testimonials-creator/inc/widget.php+4
    Methods with the same name as their class will not be constructors in a future version of PHP; tmls_widget has a deprecated constructor

Server metrics [RAM: ▼1.05MB] [CPU: ▼50.29ms] Passed 4 tests

Analyzing server-side resources used by Testimonials Creator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.94 ▼0.539.23 ▼35.68
Dashboard /wp-admin2.96 ▼0.3510.44 ▼43.02
Posts /wp-admin/edit.php2.96 ▼0.4010.83 ▼42.82
Add New Post /wp-admin/post-new.php2.96 ▼2.939.45 ▼79.62
Media Library /wp-admin/upload.php2.96 ▼0.2810.21 ▼29.26
Categories /wp-admin/edit-tags.php?taxonomy=tmlscategory&post_type=tmls2.9611.19
Submission form /wp-admin/post-new.php?post_type=tmls_form_sc2.969.58
Generate shortcode /wp-admin/post-new.php?post_type=tmls_sc2.9611.75
Saved Shortcodes /wp-admin/edit.php?post_type=tmls_sc2.969.96
Add new testimonial /wp-admin/post-new.php?post_type=tmls2.969.42
Saved forms /wp-admin/edit.php?post_type=tmls_form_sc2.9610.77
All testimonials /wp-admin/edit.php?post_type=tmls2.9610.03

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Testimonials Creator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,003 ▲24213.88 ▼0.4910.63 ▲8.9045.36 ▲2.10
Dashboard /wp-admin2,294 ▲1205.57 ▲0.0387.43 ▼12.0940.41 ▼2.19
Posts /wp-admin/edit.php2,147 ▲472.00 ▼0.1441.38 ▲3.2236.76 ▲1.23
Add New Post /wp-admin/post-new.php1,584 ▲5823.30 ▲5.77641.09 ▼54.7455.73 ▲3.80
Media Library /wp-admin/upload.php1,447 ▲474.22 ▼0.05102.44 ▼9.0643.40 ▼4.95
Categories /wp-admin/edit-tags.php?taxonomy=tmlscategory&post_type=tmls1,3212.1426.8430.60
Submission form /wp-admin/post-new.php?post_type=tmls_form_sc4,8374.89181.2358.34
Generate shortcode /wp-admin/post-new.php?post_type=tmls_sc5,5914.73214.8489.66
Saved Shortcodes /wp-admin/edit.php?post_type=tmls_sc1,1271.9830.5930.63
Add new testimonial /wp-admin/post-new.php?post_type=tmls2,5027.41153.1162.15
Saved forms /wp-admin/edit.php?post_type=tmls_form_sc1,1091.9634.2031.40
All testimonials /wp-admin/edit.php?post_type=tmls1,1872.0131.8232.04

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/testimonials-creator/inc/widget.php+4
    Methods with the same name as their class will not be constructors in a future version of PHP; tmls_widget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_tmls_widget
    • can_compress_scripts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=tmls
    • > POST request to /wp-admin/admin-ajax.php
    • > Deprecated in wp-content/plugins/testimonials-creator/inc/widget.php+4
    Methods with the same name as their class will not be constructors in a future version of PHP; tmls_widget has a deprecated constructor
    • > GET request to /wp-admin/edit.php?post_type=tmls
    • > Notice in wp-content/plugins/testimonials-creator/inc/testimonial_custom_post.php+86
    Undefined index: order

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 fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/testimonials-creator/inc/form_generate_shortcode/do_shortcode.php
  • 142× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: testimonial_text in wp-content/plugins/testimonials-creator/inc/layouts/styles/style4.php on line 7
    • > PHP Notice
      Undefined variable: text_font_family in wp-content/plugins/testimonials-creator/inc/layouts/styles/slider2.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/testimonials-creator/inc/testimonials_generate_shortcode/generate_shortcode.php:7
    • > PHP Notice
      Undefined variable: usedimages in wp-content/plugins/testimonials-creator/inc/layouts/styles/style5.php on line 18
    • > PHP Notice
      Undefined variable: usedimages in wp-content/plugins/testimonials-creator/inc/layouts/styles/style1.php on line 7
    • > PHP Notice
      Undefined variable: dialogbgcolor in wp-content/plugins/testimonials-creator/inc/layouts/styles/style5.php on line 7
    • > PHP Notice
      Undefined variable: image_radius in wp-content/plugins/testimonials-creator/inc/layouts/styles/slider2.php on line 5
    • > PHP Notice
      Undefined variable: text_font_color in wp-content/plugins/testimonials-creator/inc/layouts/styles/style4.php on line 7
    • > PHP Notice
      Undefined variable: usedimages in wp-content/plugins/testimonials-creator/inc/layouts/styles/style1.php on line 7
    • > PHP Notice
      Undefined variable: html in wp-content/plugins/testimonials-creator/inc/layouts/styles/style2.php on line 3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/post-new.php?post_type=tmls_form_sc
    • > Network (severe)
    wp-content/plugins/tmls_testimonials/inc/form_generate_shortcode/do_shortcode.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/post-new.php?post_type=tmls_sc
    • > Network (severe)
    wp-content/plugins/tmls_testimonials/inc/testimonials_generate_shortcode/do_shortcode.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/post-new.php?post_type=tmls
    • > Network (severe)
    wp-content/themes/twentytwentyone/css/admin.css - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/post-new.php?post_type=tmls
    • > Network (severe)
    wp-content/plugins/testimonials-creator/js/admin.js - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3 in testimonials-creator/assets to your readme.txt
You can take inspiration from this readme.txt

testimonials-creator/testimonials.php 85% from 13 tests

The entry point to "Testimonials Creator" version 1.5 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("testimonials-creator.php" instead of "testimonials.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 144 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin10,445 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript58762204,866
PHP231,3467363,811
CSS22351071,354
SVG100414

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.77
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions34
▷ Named functions34100.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
6 PNG files occupy 0.10MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/admin_overlay_bg.png0.19KB0.09KB▼ 50.00%
images/composer-icon.png2.02KB0.52KB▼ 74.40%
images/people_icon.png4.17KB1.14KB▼ 72.62%
images/arrow.png0.42KB0.23KB▼ 44.94%
images/next.png48.93KB0.25KB▼ 99.48%