72% advanced-wp-testimonial

Code Review | Advanced WP Testimonial

WordPress plugin Advanced WP Testimonial scored 72% from 54 tests.

About plugin

  • Plugin page: advanced-wp-testi...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4.2
  • WordPress version: 5.9.2
  • First release: Dec 9, 2012
  • Latest release: Dec 9, 2012
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: anthakkar08 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,461 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.35MB] [CPU: ▼317.80ms] Passed 4 tests

Analyzing server-side resources used by Advanced WP Testimonial
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.21 ▼0.3020.16 ▼31.71
Dashboard /wp-admin3.36 ▼0.0522.88 ▼13.16
Posts /wp-admin/edit.php3.42 ▼0.2225.12 ▼20.20
Add New Post /wp-admin/post-new.php6.15 ▼0.8273.98 ▼1,206.11
Media Library /wp-admin/upload.php3.36 ▲0.0718.86 ▼6.49
Settings /wp-admin/edit.php?post_type=awt_testimonial&page=awt_settings3.3724.24
Testimonials /wp-admin/edit.php?post_type=awt_testimonial3.5128.07
Add Testimonials /wp-admin/post-new.php?post_type=awt_testimonial3.3429.35

Server storage [IO: ▲0.60MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 1 new option
New WordPress options
widget_awt_testimonial_widget

Browser metrics Passed 4 tests

Checking browser requirements for Advanced WP Testimonial
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,807 ▲6515.44 ▼0.166.61 ▲0.332.08 ▼0.05
Dashboard /wp-admin2,934 ▲816.16 ▲0.04119.48 ▼13.23160.82 ▼7.36
Posts /wp-admin/edit.php2,730 ▲393.23 ▼0.0163.08 ▼5.51140.90 ▼30.28
Add New Post /wp-admin/post-new.php1,687 ▼3216.04 ▼5.99413.04 ▼11.15160.74 ▲7.76
Media Library /wp-admin/upload.php1,738 ▲405.54 ▲0.02140.75 ▼2.48186.47 ▼3.74
Settings /wp-admin/edit.php?post_type=awt_testimonial&page=awt_settings1,3022.5753.35185.67
Testimonials /wp-admin/edit.php?post_type=awt_testimonial1,4203.1861.39116.36
Add Testimonials /wp-admin/post-new.php?post_type=awt_testimonial3,00610.17189.74211.41

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 75% 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 uninstall procedure has failed, leaving 1 option in the database
    • widget_awt_testimonial_widget

Smoke tests 25% 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)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/post-new.php?post_type=awt_testimonial
    • > Notice in wp-content/plugins/advanced-wp-testimonial/init.php+89
    Undefined index: awt_client_name
    • > GET request to /wp-admin/post-new.php?post_type=awt_testimonial
    • > Notice in wp-content/plugins/advanced-wp-testimonial/init.php+90
    Undefined index: awt_client_siteurl
    • > GET request to /wp-admin/post-new.php?post_type=awt_testimonial
    • > Notice in wp-content/plugins/advanced-wp-testimonial/html/client_meta_box.php+4
    Undefined index: post

SRP 0% 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
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/advanced-wp-testimonial/template/widget-awt_testimonial.php
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/advanced-wp-testimonial/widgets/testimonial_widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/advanced-wp-testimonial/template/archive-awt_testimonial.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/advanced-wp-testimonial/widgets/testimonial_widget.php:3
    • > PHP Notice
      Trying to get property 'posts' of non-object in wp-content/plugins/advanced-wp-testimonial/template/widget-awt_testimonial.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/advanced-wp-testimonial/template/single-awt_testimonial.php:2
    • > PHP Notice
      Trying to get property 'after_widget' of non-object in wp-content/plugins/advanced-wp-testimonial/template/widget-awt_testimonial.php on line 53
    • > PHP Notice
      Trying to get property 'before_widget' of non-object in wp-content/plugins/advanced-wp-testimonial/template/widget-awt_testimonial.php on line 4
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/advanced-wp-testimonial/template/widget-awt_testimonial.php on line 18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (General Settings Screen For the Plugin Options), #2 (list of All the Testimonials), #3 (Add New Testimonial)
The official readme.txt might help

advanced-wp-testimonial/init.php 92% from 13 tests

"Advanced WP Testimonial" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("advanced-wp-testimonial.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected721 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP89033699
JavaScript15022

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity13.50
▷ Minimum class complexity7.00
▷ Maximum class complexity20.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.57MB with 0.34MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/facebook.png4.16KB2.32KB▼ 44.35%
img/wordpress.png4.79KB2.37KB▼ 50.49%
screenshot-1.png177.87KB52.71KB▼ 70.37%
screenshot-2.png193.99KB66.45KB▼ 65.74%
screenshot-3.png197.49KB62.62KB▼ 68.29%