78% viavi-wp-testimonials

Code Review | Viavi WP Testimonials

WordPress plugin Viavi WP Testimonials scored 78% from 54 tests.

About plugin

  • Plugin page: viavi-wp-testimon...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.4.0
  • WordPress version: 6.3.1
  • First release: Aug 22, 2014
  • Latest release: Dec 22, 2015
  • Number of updates: 10
  • Update frequency: every 48.8 days
  • Top authors: viaviwebtech (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active / 1,829 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▲0.16ms] Passed 4 tests

This is a short check of server-side resources used by Viavi WP Testimonials
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.09 ▼0.66
Dashboard /wp-admin3.35 ▲0.0549.46 ▲1.74
Posts /wp-admin/edit.php3.47 ▲0.1152.42 ▲5.19
Add New Post /wp-admin/post-new.php5.91 ▲0.0396.96 ▲0.15
Media Library /wp-admin/upload.php3.25 ▲0.0236.37 ▼0.60
Testimonial Help /wp-admin/edit.php?post_type=testimonial&page=testimonial_help3.2936.15
Add New /wp-admin/post-new.php?post_type=testimonial3.1141.60
WP Testimonials /wp-admin/edit.php?post_type=testimonial3.3240.67

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Viavi WP Testimonials
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,065 ▲33015.24 ▲0.875.85 ▲4.2342.71 ▼3.30
Dashboard /wp-admin2,384 ▲2026.44 ▲0.60128.47 ▲24.5276.85 ▲32.00
Posts /wp-admin/edit.php2,290 ▲2043.40 ▲1.4250.20 ▲14.2669.11 ▲33.72
Add New Post /wp-admin/post-new.php1,566 ▲3323.39 ▲0.38642.88 ▼32.9337.67 ▼14.29
Media Library /wp-admin/upload.php1,429 ▲414.06 ▼0.1682.48 ▼19.9681.65 ▲38.69
Testimonial Help /wp-admin/edit.php?post_type=testimonial&page=testimonial_help1,3153.3850.53102.43
Add New /wp-admin/post-new.php?post_type=testimonial2,2347.65162.15116.29
WP Testimonials /wp-admin/edit.php?post_type=testimonial1,2543.4045.6168.96

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% 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
    • > GET request to /wp-admin/post-new.php?post_type=testimonial
    • > Notice in wp-content/plugins/viavi-wp-testimonials/cpt.php+59
    Undefined index: WordPress_Testimonials_metabox_nonce

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 30× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/viavi-wp-testimonials/WordPress_Testimonials-Help.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/viavi-wp-testimonials/view/slider/slider-one.php:7
    • > PHP Notice
      Undefined variable: colors_theme in wp-content/plugins/viavi-wp-testimonials/view/tp_table.php on line 2
    • > PHP Notice
      Undefined variable: colors_theme in wp-content/plugins/viavi-wp-testimonials/view/list-three.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/viavi-wp-testimonials/view/list-one.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/viavi-wp-testimonials/cpt.php:43
    • > PHP Notice
      Undefined variable: colors_theme in wp-content/plugins/viavi-wp-testimonials/view/slider/slider-one.php on line 3
    • > PHP Notice
      Undefined variable: colors_theme in wp-content/plugins/viavi-wp-testimonials/view/list-one.php on line 2
    • > PHP Notice
      Undefined variable: WordPress_Testimonials in wp-content/plugins/viavi-wp-testimonials/view/list-three.php on line 4
    • > PHP Notice
      Undefined variable: colors_theme in wp-content/plugins/viavi-wp-testimonials/view/list-two.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Add new testimonials), #2 (Testimonials Help), #3 (Testimonial Style 1), #4 (Testimonial Style 2), #5 (Testimonial Style 3)
The official readme.txt is a good inspiration

viavi-wp-testimonials/WordPress_Testimonials.php 92% from 13 tests

The main file in "Viavi WP Testimonials" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("viavi-wp-testimonials.php" instead of "WordPress_Testimonials.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,740 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
CSS31411081,095
PHP1112036572
JavaScript2261273

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
15 PNG files occupy 0.51MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/WordPress_Testimonials-icon02.png0.39KB0.62KB0.00%
images/client.png0.63KB0.58KB▼ 8.26%
images/ANDROID-BANNER.png203.49KB65.07KB▼ 68.03%
images/arrow-right.png1.24KB0.37KB▼ 70.43%
images/arrow-left.png1.24KB0.37KB▼ 69.75%