84% wp-testimonial-block

Code Review | Testimonial Block

WordPress plugin Testimonial Block scored84%from 54 tests.

About plugin

  • Plugin page: wp-testimonial-block
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.2-5.8.0
  • WordPress version: 6.3.1
  • First release: Sep 12, 2020
  • Latest release: Aug 3, 2021
  • Number of updates: 5
  • Update frequency: every 65.2 days
  • Top authors: ibachal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,022 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.57ms] Passed 4 tests

An overview of server-side resources used by Testimonial Block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.57 ▼4.93
Dashboard /wp-admin3.32 ▲0.0146.18 ▼3.65
Posts /wp-admin/edit.php3.37 ▲0.0149.27 ▲3.75
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.01 ▼13.46
Media Library /wp-admin/upload.php3.24 ▲0.0139.06 ▲8.03

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Testimonial Block
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.12 ▼1.511.82 ▲0.0239.47 ▼4.02
Dashboard /wp-admin2,203 ▲154.84 ▼1.01113.32 ▼6.6940.75 ▼5.69
Posts /wp-admin/edit.php2,089 ▼32.04 ▲0.0340.97 ▼4.6234.42 ▼3.03
Add New Post /wp-admin/post-new.php6,354 ▲4,81227.84 ▲9.78933.70 ▲291.9463.58 ▲10.97
Media Library /wp-admin/upload.php1,382 ▼64.19 ▼0.1199.98 ▼5.5841.48 ▼1.32

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-testimonial-block/testimonial.php:60

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: block, review, testimonial block, gutenberg testimonial

wp-testimonial-block/testimonial.php 85% from 13 tests

The main PHP file in "Testimonial Block" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-testimonial-block.php" instead of "testimonial.php")

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 detected61 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP251640
JSON10016
CSS2404
JavaScript1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.07
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin