10% simple-fading-testimonials-widget

Code Review | Simple Fading Testimonials Widget

WordPress plugin Simple Fading Testimonials Widget scored 10% from 54 tests.

About plugin

  • Plugin page: simple-fading-tes...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-5.0.3
  • WordPress version: 5.9.2
  • First release: Apr 28, 2016
  • Latest release: Jan 23, 2019
  • Number of updates: 28
  • Update frequency: every 35.7 days
  • Top authors: skempin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 940 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/simple-fading-testimonials-widget/admin/partials/widget.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; wp_simple_fading_testimonials has a deprecated constructor

Server metrics [RAM: ▼2.42MB] [CPU: ▼341.49ms] Passed 4 tests

A check of server-side resources used by Simple Fading Testimonials Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.96 ▼1.564.59 ▼45.07
Dashboard /wp-admin1.98 ▼1.434.10 ▼28.66
Posts /wp-admin/edit.php1.98 ▼1.664.80 ▼31.30
Add New Post /wp-admin/post-new.php1.98 ▼5.024.15 ▼1,260.93
Media Library /wp-admin/upload.php1.98 ▼1.324.75 ▼19.13
All Testimonials /wp-admin/edit.php?post_type=testimonial1.984.47
Add New Testimonial /wp-admin/post-new.php?post_type=testimonial1.984.37

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 1 new option
New WordPress options
widget_wp_simple_fading_testimonials

Browser metrics Passed 4 tests

Simple Fading Testimonials Widget: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,947 ▲19316.20 ▲0.509.29 ▲3.3219.82 ▲17.44
Dashboard /wp-admin2,927 ▲736.13 ▼0.06120.54 ▼12.21156.91 ▼0.62
Posts /wp-admin/edit.php2,726 ▲353.24 ▲0.0163.48 ▲0.54142.51 ▼1.34
Add New Post /wp-admin/post-new.php1,742 ▲8222.35 ▲3.96399.01 ▼23.18158.92 ▲7.35
Media Library /wp-admin/upload.php1,733 ▲385.52 ▲0.02145.93 ▲1.66192.77 ▲9.50
All Testimonials /wp-admin/edit.php?post_type=testimonial1,4203.1661.0997.77
Add New Testimonial /wp-admin/post-new.php?post_type=testimonial2,85010.05186.66195.36

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/simple-fading-testimonials-widget/admin/partials/widget.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; wp_simple_fading_testimonials has a deprecated constructor
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_wp_simple_fading_testimonials

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=testimonial
    • > Deprecated in wp-content/plugins/simple-fading-testimonials-widget/admin/partials/widget.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; wp_simple_fading_testimonials has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=testimonial
    • > Deprecated in wp-content/plugins/simple-fading-testimonials-widget/admin/partials/widget.php+177
    Function create_function() is deprecated
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=testimonial
    • > User deprecated in wp-includes/functions.php+5409
    The called constructor method for WP_Widget in wp_simple_fading_testimonials is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/post-new.php?post_type=testimonial
    • > Notice in wp-content/plugins/simple-fading-testimonials-widget/admin/partials/custom_field.php+80
    Undefined variable: screen
    • > GET request to /wp-admin/post-new.php?post_type=testimonial
    • > Notice in wp-content/plugins/simple-fading-testimonials-widget/admin/partials/custom_field.php+80
    Trying to get property 'post_type' of non-object

SRP 50% 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 take a closer look at the following
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-fading-testimonials-widget/public/partials/docReady.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-fading-testimonials-widget/public/partials/docReady.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-fading-testimonials-widget/admin/partials/custom_field.php:38
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-fading-testimonials-widget/admin/partials/widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-fading-testimonials-widget/admin/partials/custom_field.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: quotes, fadein, jquery, testimonials, widgets...

simple-fading-testimonials-widget/simple-fading-testimonials.php 92% from 13 tests

The entry point to "Simple Fading Testimonials Widget" version 1.1.2 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-fading-testimonials-widget.php" instead of "simple-fading-testimonials.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin583 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP12168551390
PO File24856131
JavaScript2211636
CSS23226

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity3.25
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin