84% advanced-testimonial

Code Review | Advanced Testimonial

WordPress plugin Advanced Testimonial scored84%from 54 tests.

About plugin

  • Plugin page: advanced-testimonial
  • Plugin version: 2.0.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 27, 2021
  • Latest release: Dec 16, 2022
  • Number of updates: 13
  • Update frequency: every 46.1 days
  • Top authors: kstmonowar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /421 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.64MB] [CPU: ▼3.93ms] Passed 4 tests

This is a short check of server-side resources used by Advanced Testimonial
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.89 ▲0.4242.69 ▲0.30
Dashboard /wp-admin4.03 ▲0.7247.98 ▼4.35
Posts /wp-admin/edit.php4.05 ▲0.6948.01 ▲1.07
Add New Post /wp-admin/post-new.php6.62 ▲0.7385.11 ▼12.75
Media Library /wp-admin/upload.php3.95 ▲0.7241.93 ▲6.29
View Sliders /wp-admin/edit.php?post_type=slider4.0039.90
Create New Slider /wp-admin/post-new.php?post_type=slider4.4953.86

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 151 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Testimonial
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,941 ▲19514.00 ▼0.3810.27 ▲8.1447.97 ▲5.60
Dashboard /wp-admin2,244 ▲564.95 ▼1.09111.39 ▼5.3240.75 ▼4.21
Posts /wp-admin/edit.php2,127 ▲382.08 ▲0.0534.95 ▼4.9232.38 ▲0.93
Add New Post /wp-admin/post-new.php1,544 ▲2417.82 ▼5.56719.98 ▲79.4957.20 ▲1.61
Media Library /wp-admin/upload.php1,426 ▲414.30 ▲0.07100.22 ▼0.6943.97 ▲0.68
View Sliders /wp-admin/edit.php?post_type=slider1,0992.0032.8830.59
Create New Slider /wp-admin/post-new.php?post_type=slider1,9663.7570.86103.52

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 44× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-testimonial/inc/function.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/advanced-testimonial/inc/CMB2/includes/types/CMB2_Type_Counter_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/advanced-testimonial/inc/CMB2/includes/types/CMB2_Type_Picker_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-testimonial/inc/shortcode-metabox.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_REST_Controller_Boxes' not found in wp-content/plugins/advanced-testimonial/inc/CMB2/includes/rest-api/CMB2_REST_Controller_Fields.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/advanced-testimonial/inc/CMB2/includes/types/CMB2_Type_Textarea_Code.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/advanced-testimonial/inc/CMB2/includes/types/CMB2_Type_Text_Datetime_Timestamp_Timezone.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/advanced-testimonial/inc/CMB2/includes/rest-api/CMB2_REST.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Counter_Base' not found in wp-content/plugins/advanced-testimonial/inc/CMB2/includes/types/CMB2_Type_Textarea.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/advanced-testimonial/inc/advanced-testimonial-slide.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #2 (The slider edit page), #3 (This is Movile view)
  • Requires at least: Version format is invalid
Please take inspiration from this readme.txt

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

This is the main PHP file of "Advanced Testimonial" version 2.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
105 characters long description:
This plugin allows you to easily create a beautiful carousel slider to display in a Advanced Testimonial.

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
Everything looks great! No dangerous files found in this plugin20,940 lines of code in 115 files:
LanguageFilesBlank linesComment linesLines of code
PHP642,3246,5007,613
CSS208021,2407,498
SVG1002,671
JavaScript123756661,470
Sass17305291,407
Markdown1580281

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity18.51
▷ Minimum class complexity1.00
▷ Maximum class complexity186.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes70
▷ Abstract classes912.86%
▷ Concrete classes6187.14%
▷ Final classes11.64%
Methods544
▷ Static methods8916.36%
▷ Public methods45283.09%
▷ Protected methods8916.36%
▷ Private methods30.55%
Functions42
▷ Named functions42100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants327.27%
▷ Class constants872.73%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
15 compressed PNG files occupy 0.04MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/CMB2/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%
inc/CMB2/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
inc/CMB2/images/ico-delete.png0.70KB0.72KB0.00%
inc/CMB2/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
inc/CMB2/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%