10% simple-wp-testimonials

Code Review | Simple WP Testimonials

WordPress plugin Simple WP Testimonials scored10%from 54 tests.

About plugin

  • Plugin page: simple-wp-testimo...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7.3
  • WordPress version: 6.3.1
  • First release: Apr 11, 2015
  • Latest release: Apr 19, 2015
  • Number of updates: 19
  • Update frequency: every 37.0 days
  • Top authors: deepaksharma (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,902 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/simple-wp-testimonials/widgets.php+8
    Methods with the same name as their class will not be constructors in a future version of PHP; Testimonials_Widget has a deprecated constructor

Server metrics [RAM: ▼1.83MB] [CPU: ▼55.44ms] Passed 4 tests

Analyzing server-side resources used by Simple WP Testimonials
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.16 ▼1.315.23 ▼35.74
Dashboard /wp-admin2.18 ▼1.136.64 ▼42.92
Posts /wp-admin/edit.php2.18 ▼1.187.15 ▼46.32
Add New Post /wp-admin/post-new.php2.18 ▼3.716.91 ▼96.76
Media Library /wp-admin/upload.php2.18 ▼1.056.68 ▼27.67
Testimonials /wp-admin/edit.php?post_type=testimonial-post2.186.52
Add New /wp-admin/post-new.php?post_type=testimonial-post2.187.07

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_testimonial-widget
can_compress_scripts

Browser metrics Passed 4 tests

Simple WP Testimonials: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲6513.24 ▼1.322.26 ▼0.0242.82 ▼3.88
Dashboard /wp-admin2,232 ▲445.81 ▲0.9698.45 ▼8.3442.27 ▼1.89
Posts /wp-admin/edit.php2,118 ▲262.01 ▼0.0139.88 ▼1.1335.47 ▼4.51
Add New Post /wp-admin/post-new.php1,558 ▲2123.30 ▲0.11583.74 ▼72.2650.48 ▼6.46
Media Library /wp-admin/upload.php1,420 ▲324.25 ▲0.0394.59 ▼3.6341.43 ▼2.23
Testimonials /wp-admin/edit.php?post_type=testimonial-post1,1001.9430.8528.72
Add New /wp-admin/post-new.php?post_type=testimonial-post2,5107.65188.7874.49

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
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/simple-wp-testimonials/widgets.php+8
    Methods with the same name as their class will not be constructors in a future version of PHP; Testimonials_Widget has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • widget_testimonial-widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=testimonial-post
    • > Deprecated in wp-content/plugins/simple-wp-testimonials/widgets.php+8
    Methods with the same name as their class will not be constructors in a future version of PHP; Testimonials_Widget has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=testimonial-post
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Testimonials_Widget is deprecated since version 4.3.0! Use __construct() instead.

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
The following issues need your attention
  • 4× 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-wp-testimonials/admin-functions.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/simple-wp-testimonials/shortcode.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-wp-testimonials/widgets.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-wp-testimonials/index.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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 is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Add the Testimonials Page.), #2 (Admin List of Testimonials.), #3 (Frontend Testimonials List.), #4 (Widgets Manage.), #5 (Testimonial Slider in Sidebar.)
The official readme.txt is a good inspiration

simple-wp-testimonials/index.php 92% from 13 tests

"Simple WP Testimonials" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("simple-wp-testimonials.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin903 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP5187141619
JavaScript23718175
CSS1195109

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity21.33
▷ Minimum class complexity17.00
▷ Maximum class complexity27.00
Average method complexity4.05
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods20
▷ Static methods420.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
10 PNG files occupy 0.71MB with 0.33MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/slidebox_next_hover.png0.22KB0.13KB▼ 40.44%
screenshot-2.png46.31KB19.48KB▼ 57.94%
images/slidebox_previous_hover.png0.17KB0.10KB▼ 38.24%
screenshot-4.png11.16KB5.34KB▼ 52.17%
screenshot-1.png38.71KB21.61KB▼ 44.16%