10% idt-testimonial

Code Review | IDT Testimonial

WordPress plugin IDT Testimonial scored10%from 54 tests.

About plugin

  • Plugin page: idt-testimonial
  • Plugin version: 0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.4
  • WordPress version: 6.3.1
  • First release: Feb 28, 2018
  • Latest release: Apr 12, 2018
  • Number of updates: 6
  • Update frequency: every 7.2 days
  • Top authors: innovativedigitalteam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /576 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 did not install without errors
    • > Notice in wp-content/plugins/idt-testimonial/idt-testimonial.php+51
    Undefined index: page

Server metrics [RAM: ▼1.93MB] [CPU: ▼52.46ms] Passed 4 tests

A check of server-side resources used by IDT Testimonial
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.403.89 ▼39.00
Dashboard /wp-admin2.08 ▼1.226.03 ▼45.22
Posts /wp-admin/edit.php2.08 ▼1.286.23 ▼40.66
Add New Post /wp-admin/post-new.php2.08 ▼3.816.35 ▼84.96
Media Library /wp-admin/upload.php2.08 ▼1.155.84 ▼27.13
Settings /wp-admin/admin.php?page=idt-options3.3131.31
Add testimonial /wp-admin/admin.php?page=add_testimonial3.3731.98
Testimonial /wp-admin/admin.php?page=idt-testimonial3.3730.80

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 11 new options
New WordPress options
idt_testimonial_heading
widget_recent-posts
db_upgraded
idt_show_title
widget_theysaidso_widget
idt_design_layout
widget_recent-comments
theysaidso_admin_options
idt_testimonial_desc
idt_display_image
...

Browser metrics Passed 4 tests

An overview of browser requirements for IDT Testimonial
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,294 ▲55916.37 ▲2.0020.01 ▲18.1837.73 ▼5.72
Dashboard /wp-admin2,372 ▲1836.45 ▲0.52122.33 ▲3.6140.64 ▼7.83
Posts /wp-admin/edit.php2,284 ▲1953.37 ▲1.3455.19 ▲17.5934.33 ▲0.87
Add New Post /wp-admin/post-new.php1,552 ▲3318.39 ▼4.97576.68 ▼45.7432.30 ▼23.77
Media Library /wp-admin/upload.php1,426 ▲474.21 ▲0.0378.94 ▼19.6742.08 ▼1.54
Settings /wp-admin/admin.php?page=idt-options1,0653.1537.9939.25
Add testimonial /wp-admin/admin.php?page=add_testimonial1,0183.1037.1927.08
Testimonial /wp-admin/admin.php?page=idt-testimonial1,0073.0536.9925.77

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/idt-testimonial/idt-testimonial.php+51
    Undefined index: page
  • This plugin did not uninstall successfully, leaving 11 options in the database
    • idt_testimonial_desc
    • idt_testimonial_heading
    • widget_theysaidso_widget
    • widget_recent-posts
    • idt_show_title
    • idt_design_layout
    • widget_recent-comments
    • db_upgraded
    • idt_display_image
    • can_compress_scripts
    • ...

Smoke tests 25% 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 server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=idt-options
    • > Notice in wp-content/plugins/idt-testimonial/inc/idt-admin-settings.php+40
    Undefined index: idt_settings
    • > GET request to /wp-admin/admin.php?page=idt-options
    • > Warning in wp-content/plugins/idt-testimonial/inc/idt-admin-settings.php+128
    Use of undefined constant on - assumed 'on' (this will throw an Error in a future version of PHP)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=idt-testimonial
    • > Notice in wp-content/plugins/idt-testimonial/inc/idt-admin-display.php+45
    Undefined index: idt_id
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=idt-testimonial
    • > Notice in wp-content/plugins/idt-testimonial/inc/idt-admin-display.php+58
    Undefined index: save_testimonial

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
Please take a closer look at the following
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/idt-testimonial/inc/idt-admin-display.php
    • > /wp-content/plugins/idt-testimonial/inc/idt-admin-settings.php
    • > /wp-content/plugins/idt-testimonial/inc/idt-front-display.php
    • > /wp-content/plugins/idt-testimonial/idt-testimonial.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=idt-testimonial
    • > Javascript (severe) in unknown
    /wp-content/plugins/idt-testimonial/assets/js/script.js?ver=6.3.1 3:33 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: testimonials, testimonial slider, reviews, quote, testimonial form...

idt-testimonial/idt-testimonial.php Passed 13 tests

"IDT Testimonial" version 0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
62 characters long description:
Simple plugin to Show testimonial on pages, widgets and posts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,760 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2139128934
PHP5179243527
CSS26726280
SVG10019

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity17.00
▷ Minimum class complexity8.00
▷ Maximum class complexity37.00
Average method complexity3.21
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods1551.72%
▷ Protected methods00.00%
▷ Private methods1448.28%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin