68% awesome-testimonials

Code Review | Awesome Testimonials

WordPress plugin Awesome Testimonials scored68%from 54 tests.

About plugin

  • Plugin page: awesome-testimonials
  • Plugin version: 2.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Mar 12, 2015
  • Latest release: Aug 1, 2022
  • Number of updates: 35
  • Update frequency: every 77.2 days
  • Top authors: Prakash30 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,899 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.87MB] [CPU: ▼38.43ms] Passed 4 tests

This is a short check of server-side resources used by Awesome Testimonials
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.51 ▲0.45
Dashboard /wp-admin3.07 ▼0.2323.64 ▼28.55
Posts /wp-admin/edit.php3.07 ▼0.2826.45 ▼27.83
Add New Post /wp-admin/post-new.php3.07 ▼2.8123.32 ▼84.72
Media Library /wp-admin/upload.php3.07 ▼0.1525.89 ▼12.62
All Testimonials /wp-admin/edit.php?post_type=pra_testimonials3.0823.75
Add New /wp-admin/post-new.php?post_type=pra_testimonials3.0825.13

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 16 new files
Database: 1 new table, 7 new options
New tables
wp_pra_testimonial_settings
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_pra_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Awesome Testimonials
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,947 ▲20113.65 ▼0.637.37 ▲5.4346.26 ▲6.08
Dashboard /wp-admin2,268 ▲655.84 ▼0.02100.30 ▼6.9297.88 ▲53.60
Posts /wp-admin/edit.php2,147 ▲472.05 ▲0.0638.05 ▼1.0433.31 ▼0.95
Add New Post /wp-admin/post-new.php1,569 ▲3823.08 ▲0.02707.36 ▲23.2652.79 ▼2.72
Media Library /wp-admin/upload.php1,444 ▲444.14 ▼0.1099.12 ▼14.2779.03 ▲31.76
All Testimonials /wp-admin/edit.php?post_type=pra_testimonials1,1171.9931.4830.01
Add New /wp-admin/post-new.php?post_type=pra_testimonials2,2967.62166.50130.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_pra_widget
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=pra_testimonials
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=pra_testimonials
    • > Notice in wp-content/plugins/awesome-testimonials/main.php+283
    Trying to get property 'ID' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=pra_testimonials
    • > Notice in wp-content/plugins/awesome-testimonials/main.php+222
    Undefined index: pra_ratings
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=pra_testimonials
    • > Notice in wp-content/plugins/awesome-testimonials/main.php+271
    Undefined index: pra_designation
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=pra_testimonials
    • > Notice in wp-content/plugins/awesome-testimonials/main.php+271
    Trying to access array offset on value of type null

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 items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_col() on null in wp-content/plugins/awesome-testimonials/testimonial_settings.php:257
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/awesome-testimonials/testimonial_settings.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/awesome-testimonials/main.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: auto rotate testimonial, customizable testimonial, awesome testimonial, testimony, responsive...

awesome-testimonials/main.php 92% from 13 tests

The main PHP script in "Awesome Testimonials" version 2.2.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("awesome-testimonials.php" instead of "main.php")

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
No dangerous file extensions were detected4,787 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript24411683,711
PHP418038828
CSS264248

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
7 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/arrow.png2.95KB0.29KB▼ 90.32%
images/prakash.png0.21KB0.18KB▼ 15.02%
images/noimage.png3.57KB2.08KB▼ 41.78%
css/images/prakash.png0.21KB0.18KB▼ 15.02%
css/images/stars.png5.38KB1.70KB▼ 68.49%