78% ig-testimonials

Code Review | IG Testimonials

WordPress plugin IG Testimonials scored78%from 54 tests.

About plugin

  • Plugin page: ig-testimonials
  • Plugin version: 1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.7
  • WordPress version: 6.3.1
  • First release: Jul 13, 2015
  • Latest release: Dec 30, 2016
  • Number of updates: 21
  • Update frequency: every 25.7 days
  • Top authors: iografica (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /3,199 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▲4.92ms] Passed 4 tests

This is a short check of server-side resources used by IG Testimonials
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2151.89 ▲7.27
Dashboard /wp-admin3.52 ▲0.2158.81 ▲6.56
Posts /wp-admin/edit.php3.61 ▲0.2656.25 ▲5.18
Add New Post /wp-admin/post-new.php6.10 ▲0.21103.88 ▲2.82
Media Library /wp-admin/upload.php3.44 ▲0.2143.43 ▲5.10
Categories /wp-admin/edit-tags.php?taxonomy=testimonial-cat&post_type=testimonial3.4343.04
Settings /wp-admin/edit.php?post_type=testimonial&page=ig-testimonials-settings-page3.4141.09
Add New /wp-admin/post-new.php?post_type=testimonial3.5758.98
Getting Started /wp-admin/edit.php?post_type=testimonial&page=ig-testimonials-getting-started3.3841.54
All Testimonials /wp-admin/edit.php?post_type=testimonial3.4746.95

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 33 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_ig_testimonials_carousel_widget
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

IG Testimonials: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲15513.48 ▼0.7611.43 ▲9.3742.90 ▼2.70
Dashboard /wp-admin2,237 ▲605.64 ▼0.0393.06 ▲6.2843.77 ▲5.83
Posts /wp-admin/edit.php2,139 ▲392.01 ▲0.0534.55 ▼2.6537.78 ▲2.16
Add New Post /wp-admin/post-new.php1,558 ▲3223.27 ▼0.48627.93 ▼50.1649.56 ▼7.97
Media Library /wp-admin/upload.php1,439 ▲424.21 ▼0.03100.41 ▼14.9841.09 ▼7.05
Categories /wp-admin/edit-tags.php?taxonomy=testimonial-cat&post_type=testimonial1,3102.1228.6032.82
Settings /wp-admin/edit.php?post_type=testimonial&page=ig-testimonials-settings-page9062.0222.7732.39
Add New /wp-admin/post-new.php?post_type=testimonial2,4887.61175.8668.71
Getting Started /wp-admin/edit.php?post_type=testimonial&page=ig-testimonials-getting-started1,1761.9922.3661.66
All Testimonials /wp-admin/edit.php?post_type=testimonial1,1251.9432.3434.49

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_ig_testimonials_carousel_widget
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

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
These server-side errors were triggered
    • > GET request to /wp-admin/edit.php?post_type=testimonial&page=ig-testimonials-getting-started
    • > Warning in wp-content/plugins/ig-testimonials/welcome/welcome-screen.php+15
    Use of undefined constant IG_TESTIMONIALS_NAME - assumed 'IG_TESTIMONIALS_NAME' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/edit.php?post_type=testimonial&page=ig-testimonials-getting-started
    • > Warning in wp-content/plugins/ig-testimonials/welcome/welcome-screen.php+15
    Use of undefined constant IG_TESTIMONIALS_VERSION - assumed 'IG_TESTIMONIALS_VERSION' (this will throw an Error in a future version of PHP)

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 take a closer look at the following
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/ig-testimonials/extra/ig-testimonials-shortcodes.php:92
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ig-testimonials/includes/ig-testimonials-function.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ig-testimonials/welcome/welcome-screen.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ig-testimonials/includes/ig-testimonials-post-type.php:48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/ig-testimonials/welcome/sections/welcome-free-resources.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ig-testimonials/includes/ig-testimonials-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/ig-testimonials/welcome/sections/welcome-footer.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/ig-testimonials/welcome/sections/welcome-intro.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ig-testimonials/extra/ig-testimonials-carousel-widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% 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
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Testimonials page), #2 (Testimonials carousel widget), #3 (IG Testimonials settings and shortcodes)
Please take inspiration from this readme.txt

ig-testimonials/ig-testimonials.php Passed 13 tests

The main PHP file in "IG Testimonials" ver. 1.8 adds more information about the plugin and also serves as the entry point for this plugin
124 characters long description:
IG Testimonials is a clean and simply WordPress plugin for adding Testimonials to your theme, using a shortcode or a widget.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected3,986 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3829502,065
PHP105479740
Sass52811479
CSS2785462
PO File192101227
SVG11013

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity20.50
▷ Minimum class complexity6.00
▷ Maximum class complexity35.00
Average method complexity4.90
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.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
There were not PNG files found in your plugin