10% advanced-testimonial-generator

Code Review | Advanced Testimonial Generator

WordPress plugin Advanced Testimonial Generator scored 10% from 54 tests.

About plugin

  • Plugin page: advanced-testimon...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Nov 10, 2015
  • Latest release: Nov 18, 2015
  • Number of updates: 3
  • Update frequency: every 2.7 days
  • Top authors: junaid ashraf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 758 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • Install procedure had errors
    • > User notice in wp-includes/functions.php+5768
    add_shortcode was called incorrectly. Invalid shortcode name: view data. Do not use spaces or reserved characters: & / < > [ ] = Please see Debugging in WordPress for more information. (This message was added in version 4.4.0.)

Server metrics [RAM: ▼2.50MB] [CPU: ▼350.50ms] Passed 4 tests

This is a short check of server-side resources used by Advanced Testimonial Generator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /1.87 ▼1.647.56 ▼46.96
Dashboard /wp-admin1.89 ▼1.523.60 ▼29.33
Posts /wp-admin/edit.php1.89 ▼1.754.41 ▼35.16
Add New Post /wp-admin/post-new.php1.89 ▼5.083.73 ▼1,290.53
Media Library /wp-admin/upload.php1.89 ▼1.403.95 ▼21.85

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: 1 new table, 1 new option
New tables
wp_testimonial
New WordPress options
jal_db_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advanced Testimonial Generator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,904 ▲15016.86 ▲1.2210.97 ▲4.232.58 ▼0.16
Dashboard /wp-admin2,916 ▲586.30 ▲0.08121.30 ▼14.30157.46 ▼0.67
Posts /wp-admin/edit.php2,715 ▲243.29 ▲0.0663.81 ▼0.10133.16 ▼5.09
Add New Post /wp-admin/post-new.php1,685 ▼2619.74 ▼1.24388.55 ▼80.26162.11 ▲5.04
Media Library /wp-admin/upload.php1,722 ▲275.79 ▲0.27141.74 ▲0.19188.78 ▼2.82

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5768
    add_shortcode was called incorrectly. Invalid shortcode name: view data. Do not use spaces or reserved characters: & / < > [ ] = Please see Debugging in WordPress for more information. (This message was added in version 4.4.0.)
  • Zombie tables detected upon uninstall: 1 table
    • wp_testimonial
  • The uninstall procedure has failed, leaving 1 option in the database
    • jal_db_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-testimonial-generator/testimonial-generator/index.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-testimonial-generator/testimonial-generator/frontend_view.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-testimonial-generator/index.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-testimonial-generator/frontend_view.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/advanced-testimonial-generator/view_testimonial.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/advanced-testimonial-generator/testimonial-generator/view_testimonial.php:1

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Requires at least: Version not formatted correctly
  • Contributors: The plugin contributors field is missing
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The Settings Page.), #2 (Demo Page.)
The official readme.txt might help

advanced-testimonial-generator/index.php 92% from 13 tests

The entry point to "Advanced Testimonial Generator" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("advanced-testimonial-generator.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected1,261 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3292515639
CSS24317466
PHP47815156

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.18MB with 0.12MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png166.36KB24.15KB▼ 85.49%
screenshot-1.png20.41KB10.92KB▼ 46.52%