62% webiots-testimonials

Code Review | Webiots Testimonial Showcase

WordPress plugin Webiots Testimonial Showcase scored62%from 54 tests.

About plugin

  • Plugin page: webiots-testimonials
  • Plugin version: 1.0
  • PHP compatiblity: 5.6.31+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.8.2
  • WordPress version: 6.3.1
  • First release: Oct 1, 2017
  • Latest release: Oct 1, 2017
  • Number of updates: 17
  • Update frequency: every 1.4 days
  • Top authors: webiots (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /654 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.77MB] [CPU: ▼58.50ms] Passed 4 tests

A check of server-side resources used by Webiots Testimonial Showcase
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.21 ▼1.256.98 ▼33.79
Dashboard /wp-admin2.23 ▼1.076.22 ▼48.28
Posts /wp-admin/edit.php2.24 ▼1.127.48 ▼47.42
Add New Post /wp-admin/post-new.php2.24 ▼3.657.28 ▼104.43
Media Library /wp-admin/upload.php2.24 ▼0.996.53 ▼33.85
Category /wp-admin/edit-tags.php?taxonomy=testimonial-category&post_type=app_testimonials2.246.34
Settings /wp-admin/edit.php?post_type=app_testimonials&page=testimonials-settings2.247.19
Add new Testimonials /wp-admin/post-new.php?post_type=app_testimonials2.246.64
All Testimonials /wp-admin/edit.php?post_type=app_testimonials2.249.21

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Webiots Testimonial Showcase
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,951 ▲20513.58 ▼0.799.81 ▲8.0667.60 ▲19.97
Dashboard /wp-admin2,229 ▲525.58 ▼0.0488.43 ▼3.1340.32 ▼4.81
Posts /wp-admin/edit.php2,140 ▲402.05 ▲0.0640.75 ▲1.9837.99 ▲0.24
Add New Post /wp-admin/post-new.php1,576 ▲2223.03 ▲4.94670.83 ▲35.8062.78 ▼2.91
Media Library /wp-admin/upload.php1,431 ▲314.28 ▲0.07101.21 ▲6.9845.31 ▲3.68
Category /wp-admin/edit-tags.php?taxonomy=testimonial-category&post_type=app_testimonials1,3112.1532.6131.65
Settings /wp-admin/edit.php?post_type=app_testimonials&page=testimonials-settings8492.0326.6726.33
Add new Testimonials /wp-admin/post-new.php?post_type=app_testimonials2,4017.32153.94113.96
All Testimonials /wp-admin/edit.php?post_type=app_testimonials1,1252.0029.9431.75

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/webiots-testimonials/includes/functions.php+37
    Use of undefined constant TESTIMONAILS_DIR - assumed 'TESTIMONAILS_DIR' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=app_testimonials
    • > POST request to /wp-admin/admin-ajax.php
    • > Warning in wp-content/plugins/webiots-testimonials/includes/functions.php+37
    Use of undefined constant TESTIMONAILS_DIR - assumed 'TESTIMONAILS_DIR' (this will throw an Error in a future version of PHP)

SRP 50% 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
Almost there! Just fix the following items
  • 15× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/webiots-testimonials/index.php on line 22
    • > PHP Notice
      Undefined variable: loop in wp-content/plugins/webiots-testimonials/templates/slider/slide1.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/webiots-testimonials/templates/slider/slide2.php:6
    • > PHP Notice
      Undefined variable: loop in wp-content/plugins/webiots-testimonials/templates/slider/slide4.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/webiots-testimonials/templates/slider/video.php:7
    • > PHP Warning
      include_once(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/webiots-testimonials/index.php on line 22
    • > PHP Notice
      Undefined variable: loop in wp-content/plugins/webiots-testimonials/templates/slider/slide2.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/webiots-testimonials/templates/slider/slide1.php:7
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/webiots-testimonials/templates/slider/slide4.php:7
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/webiots-testimonials/templates/slider/slide3.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/post-new.php?post_type=app_testimonials
    • > Network (severe)
    wp-content/plugins/webiots-testimonials/includes//js/admin.js?ver=1 - 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

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (grid layout), #2 (list layout), #3 (video layout)
  • Tags: Please reduce the number of tags, currently 18 tag instead of maximum 10
The official readme.txt might help

webiots-testimonials/index.php 85% from 13 tests

The main PHP script in "Webiots Testimonial Showcase" version 1.0 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("webiots-testimonials.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin3,711 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2828452,065
PHP8232118996
CSS47314637
SVG11013

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.20MB with 0.14MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png60.20KB17.22KB▼ 71.39%
screenshot-2.png75.02KB20.79KB▼ 72.29%
screenshot-3.png36.96KB10.51KB▼ 71.57%
screenshot-4.png29.81KB9.57KB▼ 67.88%