83% b-testimonial

Code Review | B Testimonial

WordPress plugin B Testimonial scored83%from 54 tests.

About plugin

  • Plugin page: b-testimonial
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Feb 3, 2021
  • Latest release: Sep 11, 2023
  • Number of updates: 15
  • Update frequency: every 63.4 days
  • Top authors: shehabulislam (66.67%)abuhayat (40%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,402 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.19MB] [CPU: ▲0.20ms] Passed 4 tests

A check of server-side resources used by B Testimonial
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2342.01 ▲0.58
Dashboard /wp-admin3.49 ▲0.1845.10 ▼4.84
Posts /wp-admin/edit.php3.53 ▲0.1847.57 ▲3.39
Add New Post /wp-admin/post-new.php6.18 ▲0.3095.41 ▲7.63
Media Library /wp-admin/upload.php3.41 ▲0.1835.80 ▲1.67
All Testimonials /wp-admin/edit.php?post_type=btstestimonial3.5041.44
Shortcode Generator /wp-admin/edit.php?post_type=btsshortcode3.5039.88
Category /wp-admin/edit-tags.php?taxonomy=btscategory&post_type=btstestimonial3.4033.50
Add New /wp-admin/post-new.php?post_type=btstestimonial3.5051.37

Server storage [IO: ▲1.79MB] [DB: ▲0.33MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 184 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

B Testimonial: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,984 ▲23813.60 ▼0.686.65 ▲5.0036.64 ▼8.11
Dashboard /wp-admin2,247 ▲595.89 ▲0.01100.38 ▼15.6939.58 ▼3.52
Posts /wp-admin/edit.php2,130 ▲412.02 ▼0.0241.44 ▲5.2035.06 ▼1.43
Add New Post /wp-admin/post-new.php6,465 ▲4,93223.62 ▲0.54885.59 ▲272.2567.69 ▲11.49
Media Library /wp-admin/upload.php1,426 ▲414.19 ▼0.0992.27 ▼7.8953.48 ▲12.32
All Testimonials /wp-admin/edit.php?post_type=btstestimonial1,2863.8256.5933.57
Shortcode Generator /wp-admin/edit.php?post_type=btsshortcode1,2863.7455.4429.75
Category /wp-admin/edit-tags.php?taxonomy=btscategory&post_type=btstestimonial1,3032.1425.8427.16
Add New /wp-admin/post-new.php?post_type=btstestimonial1,8354.4071.9336.00

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 14× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/b-testimonial/inc/theme/eleven.php:4
    • > PHP Notice
      Undefined variable: class in wp-content/plugins/b-testimonial/inc/theme/eleven.php on line 3
    • > PHP Notice
      Undefined variable: class in wp-content/plugins/b-testimonial/inc/theme/two.php on line 2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/b-testimonial/inc/theme/three.php:3
    • > PHP Notice
      Undefined variable: class in wp-content/plugins/b-testimonial/inc/theme/one.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/b-testimonial/inc/shortcode-free.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/b-testimonial/assets_cpt.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/b-testimonial/inc/theme/one.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/b-testimonial/inc/theme/four.php:4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/b-testimonial/inc/theme/five.php:4

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 83% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Screenshot-1.png), #2 (Screenshot-2.png), #3 (Screenshot-3.png), #4 (Screenshot-4.png), #5 (Screenshot-5.png), #6 (Screenshot-6.png), #7 (Screenshot-7.png), #8 (Screenshot-8.png), #9 (Screenshot-9.png), #10 (Screenshot-10.png)
The official readme.txt might help

b-testimonial/init.php 69% from 13 tests

"B Testimonial" version 1.2.1'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:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: Please don't use more than 140 characters for the plugin description (currently 320 characters long)
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("b-testimonial.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin37,861 lines of code in 160 files:
LanguageFilesBlank linesComment linesLines of code
PHP963,4211,54415,218
CSS142915827,183
PO File203,1973,5946,490
Sass1695344,814
JavaScript111,2693774,137
Markdown18017
SVG2002

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity25.05
▷ Minimum class complexity1.00
▷ Maximum class complexity140.00
Average method complexity6.67
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes63
▷ Abstract classes23.17%
▷ Concrete classes6196.83%
▷ Final classes00.00%
Methods267
▷ Static methods4215.73%
▷ Public methods26599.25%
▷ Protected methods00.00%
▷ Private methods20.75%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/codestar-framework/assets/images/checkerboard.png2.29KB2.54KB0.00%