10% fp-testimonials

Code Review | FP Testimonials

WordPress plugin FP Testimonials scored10%from 54 tests.

About plugin

  • Plugin page: fp-testimonials
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.0-3.5.2
  • WordPress version: 6.3.1
  • First release: Jun 24, 2013
  • Latest release: Jul 4, 2013
  • Number of updates: 22
  • Update frequency: every 0.5 days
  • Top authors: digontobd (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

90+ active /5,675 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/fp-testimonials/fp_testimonials.php+112
    Methods with the same name as their class will not be constructors in a future version of PHP; TestimonailWidget has a deprecated constructor

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

A check of server-side resources used by FP Testimonials
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.21 ▼1.256.30 ▼37.49
Dashboard /wp-admin2.23 ▼1.075.81 ▼49.87
Posts /wp-admin/edit.php2.23 ▼1.126.27 ▼51.28
Add New Post /wp-admin/post-new.php2.23 ▼3.657.14 ▼89.20
Media Library /wp-admin/upload.php2.23 ▼1.005.90 ▼35.84
FP Testimonials /wp-admin/edit.php?post_type=testimonial2.236.52
Add New /wp-admin/post-new.php?post_type=testimonial2.236.59

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
widget_testimonailwidget
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for FP Testimonials
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲12713.49 ▼0.787.89 ▲5.5140.79 ▼5.66
Dashboard /wp-admin2,229 ▲555.62 ▲0.0989.13 ▼14.5837.76 ▼4.44
Posts /wp-admin/edit.php2,134 ▲341.98 ▲0.0138.50 ▼1.2534.62 ▼5.35
Add New Post /wp-admin/post-new.php1,558 ▲3023.18 ▲0.22613.06 ▼41.5556.44 ▼0.15
Media Library /wp-admin/upload.php1,434 ▲344.21 ▼0.0398.83 ▼12.0645.94 ▼0.81
FP Testimonials /wp-admin/edit.php?post_type=testimonial1,1291.9633.0528.44
Add New /wp-admin/post-new.php?post_type=testimonial2,2177.68168.6062.26

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/fp-testimonials/fp_testimonials.php+112
    Methods with the same name as their class will not be constructors in a future version of PHP; TestimonailWidget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_testimonailwidget
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please 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/fp-testimonials/fp_testimonials.php+112
    Methods with the same name as their class will not be constructors in a future version of PHP; TestimonailWidget has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=testimonial
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=testimonial
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the my_script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=testimonial
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the testi_css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=testimonial
    • > Deprecated in wp-content/plugins/fp-testimonials/fp_testimonials.php+335
    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+5546
    The called constructor method for WP_Widget class in TestimonailWidget is deprecated since version 4.3.0! Use __construct() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=testimonial
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/fp-testimonials/fp_testimonials.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (View of Backend Testimonial area.), #2 (View Backend Widget Settings.), #3 (View Frontend Widget View.), #4 (View Frontend Testimonial Page with Pagination.)
The official readme.txt might help

fp-testimonials/fp_testimonials.php 85% from 13 tests

The main PHP file in "FP Testimonials" ver. 1.0.7 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("fp-testimonials.php" instead of "fp_testimonials.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 332 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
There were no executable files found in this plugin442 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13319357
CSS12484
JavaScript10111

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity49.00
▷ Minimum class complexity49.00
▷ Maximum class complexity49.00
Average method complexity13.00
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 0.14MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/right.png3.66KB0.29KB▼ 92.01%
screenshot-3.png16.50KB6.96KB▼ 57.81%
screenshot-1.png30.11KB11.60KB▼ 61.48%
images/testimonial.png0.62KB0.65KB0.00%
images/left.png3.00KB0.29KB▼ 90.38%