84% fs-testimonials

Code Review | Testimonials for Freemius

WordPress plugin Testimonials for Freemius scored84%from 54 tests.

About plugin

  • Plugin page: fs-testimonials
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.0-5.0.0
  • WordPress version: 6.3.1
  • First release: Oct 3, 2017
  • Latest release: Dec 10, 2018
  • Number of updates: 7
  • Update frequency: every 62.0 days
  • Top authors: shramee (85.71%)PootlePress (28.57%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /868 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Testimonials for Freemius
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0239.25 ▼4.08
Dashboard /wp-admin3.37 ▲0.0349.59 ▼3.40
Posts /wp-admin/edit.php3.49 ▲0.0947.52 ▼4.68
Add New Post /wp-admin/post-new.php5.95 ▲0.0284.32 ▼14.59
Media Library /wp-admin/upload.php3.30 ▲0.0337.58 ▲1.40

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Testimonials for Freemius
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲3014.33 ▼0.021.89 ▲0.0740.06 ▼4.65
Dashboard /wp-admin2,192 ▲155.52 ▼0.1385.98 ▼0.7941.29 ▼2.07
Posts /wp-admin/edit.php2,100 ▼32.01 ▲0.0434.69 ▼4.9533.39 ▼2.16
Add New Post /wp-admin/post-new.php1,526 ▼022.92 ▼0.22648.94 ▼38.8752.29 ▼2.59
Media Library /wp-admin/upload.php1,397 ▼34.23 ▲0.0499.49 ▼7.4341.60 ▼5.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/fs-testimonials/inc/tpl.admin-section.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Freemius_Exception' not found in wp-content/plugins/fs-testimonials/inc/freemius/Exceptions/OAuthException.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Freemius_Exception' not found in wp-content/plugins/fs-testimonials/inc/freemius/Exceptions/InvalidArgumentException.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/fs-testimonials/fs-testimonial.php:67
    • > PHP Fatal error
      Uncaught Error: Class 'Freemius_InvalidArgumentException' not found in wp-content/plugins/fs-testimonials/inc/freemius/Exceptions/EmptyArgumentException.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Freemius_InvalidArgumentException' not found in wp-content/plugins/fs-testimonials/inc/freemius/Exceptions/ArgumentNotExistException.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
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
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Reviews frontend display), #2 (Reviews compressed drawer), #3 (Admin settings area)
You can take inspiration from this readme.txt

fs-testimonials/fs-testimonial.php 92% from 13 tests

The principal PHP file in "Testimonials for Freemius" v. 1.1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("fs-testimonials.php" instead of "fs-testimonial.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
Good job! No executable or dangerous file extensions detected708 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP9115182515
Sass160192
CSS1011

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity8.62
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity2.68
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes112.50%
▷ Concrete classes787.50%
▷ Final classes00.00%
Methods30
▷ Static methods516.67%
▷ Public methods2686.67%
▷ Protected methods310.00%
▷ Private methods13.33%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants9
▷ Global constants777.78%
▷ Class constants222.22%
▷ Public constants2100.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
No PNG files were detected