78% tc-testimonial

Code Review | Testimonial

WordPress plugin Testimonial scored78%from 54 tests.

About plugin

  • Plugin page: tc-testimonial
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4.1
  • WordPress version: 6.3.1
  • First release: Sep 30, 2016
  • Latest release: May 15, 2020
  • Number of updates: 29
  • Update frequency: every 45.6 days
  • Top authors: imranemu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

700+ active /10,457 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
Installer ran successfully

Server metrics [RAM: ▲0.27MB] [CPU: ▼2.51ms] Passed 4 tests

Server-side resources used by Testimonial
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2147.60 ▲5.63
Dashboard /wp-admin3.66 ▲0.3564.90 ▲15.68
Posts /wp-admin/edit.php3.71 ▲0.3553.30 ▼1.38
Add New Post /wp-admin/post-new.php6.16 ▲0.2787.44 ▼18.14
Media Library /wp-admin/upload.php3.50 ▲0.2640.12 ▲3.86
Categories /wp-admin/edit-tags.php?taxonomy=tctestimonial_category&post_type=tctestimonial3.5243.31
Testimonial Settings /wp-admin/edit.php?post_type=tctestimonial&page=tct-settings3.5041.40
Help & Upgrade /wp-admin/edit.php?post_type=tctestimonial&page=tcodes_testimonial_menu_help3.5039.24
Add New /wp-admin/post-new.php?post_type=tctestimonial3.6272.40
All Testimonials /wp-admin/edit.php?post_type=tctestimonial3.5747.61

Server storage [IO: ▲0.20MB] [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: 27 new files
Database: no new tables, 9 new options
New WordPress options
tct_basics
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
tct_advanced
widget_recent-comments
tct_styles
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Testimonial
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,107 ▲34615.01 ▲0.616.47 ▲4.8642.23 ▼4.58
Dashboard /wp-admin2,387 ▲2106.39 ▲0.74119.13 ▲24.8743.68 ▼0.26
Posts /wp-admin/edit.php2,318 ▲2183.51 ▲1.5349.86 ▲7.7534.87 ▲1.41
Add New Post /wp-admin/post-new.php6,306 ▲4,78026.12 ▲3.24907.81 ▲211.6240.20 ▼13.29
Media Library /wp-admin/upload.php1,458 ▲614.32 ▲0.0988.06 ▼15.2745.59 ▲0.21
Categories /wp-admin/edit-tags.php?taxonomy=tctestimonial_category&post_type=tctestimonial1,4983.3145.1531.28
Testimonial Settings /wp-admin/edit.php?post_type=tctestimonial&page=tct-settings2,6253.88103.6826.47
Help & Upgrade /wp-admin/edit.php?post_type=tctestimonial&page=tcodes_testimonial_menu_help1,59410.20305.5676.73
Add New /wp-admin/post-new.php?post_type=tctestimonial2,3687.91174.5567.40
All Testimonials /wp-admin/edit.php?post_type=tctestimonial1,3263.6245.2029.67

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • tct_styles
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • tct_advanced
    • tct_basics

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
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/tc-testimonial/lib/tc-testimonial-help-upgrade.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tc-testimonial/lib/tc-testimonial-metabox.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/tc-testimonial/tc-testimonial.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Tags: Please delete some tags, you are using 29 tag instead of maximum 10
The official readme.txt might help

tc-testimonial/tc-testimonial.php 85% from 13 tests

The main file in "Testimonial" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Description: Keep the plugin description shorter than 140 characters (currently 142 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected3,320 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript24508571,764
PHP10233248996
CSS54846490
Markdown138070

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity36.00
▷ Minimum class complexity3.00
▷ Maximum class complexity69.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods35
▷ Static methods00.00%
▷ Public methods35100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
vendors/owl-carousel/assets/owl.video.play.png4.86KB2.74KB▼ 43.61%