10% advanced-testimonial-generator

Code Review | Advanced Testimonial Generator

WordPress plugin Advanced Testimonial Generator scored10%from 54 tests.

About plugin

  • Plugin page: advanced-testimon...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • 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 /868 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
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > User notice in wp-includes/functions.php+5905
    Function 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: ▼1.93MB] [CPU: ▼55.80ms] Passed 4 tests

A 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 /2.05 ▼1.414.35 ▼36.30
Dashboard /wp-admin2.07 ▼1.235.28 ▼44.10
Posts /wp-admin/edit.php2.08 ▼1.286.96 ▼43.21
Add New Post /wp-admin/post-new.php2.08 ▼3.816.04 ▼99.60
Media Library /wp-admin/upload.php2.08 ▼1.155.28 ▼30.17

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 22 new files
Database: 1 new table, 7 new options
New tables
wp_testimonial
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
jal_db_version
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Testimonial Generator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,936 ▲19014.04 ▼0.316.30 ▲4.6343.39 ▲4.37
Dashboard /wp-admin2,223 ▲385.83 ▼0.03108.21 ▲8.4839.32 ▼2.84
Posts /wp-admin/edit.php2,112 ▲232.05 ▲0.0339.87 ▲0.0531.81 ▼4.62
Add New Post /wp-admin/post-new.php1,550 ▲3121.10 ▼2.10616.60 ▼72.5749.27 ▼1.48
Media Library /wp-admin/upload.php1,402 ▲144.21 ▼0.0297.65 ▼1.4443.76 ▲0.75

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function 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.)
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_testimonial
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • jal_db_version
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please fix the following items
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > 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 admin_url() in wp-content/plugins/advanced-testimonial-generator/testimonial-generator/view_testimonial.php:1
    • > 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 add_action() in wp-content/plugins/advanced-testimonial-generator/frontend_view.php:44

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (The Settings Page.), #2 (Demo Page.)
  • Contributors: Plugin contributors field is missing
  • Requires at least: Version not formatted correctly
You can take inspiration from this readme.txt

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

The primary PHP file in "Advanced Testimonial Generator" version 1.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("advanced-testimonial-generator.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,261 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3292515639
CSS24317466
PHP47815156

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for 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

PNG files should be compressed to save space and 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-1.png20.41KB10.92KB▼ 46.52%
screenshot-2.png166.36KB24.15KB▼ 85.49%