83% hm-testimonial

Code Review | WordPress Testimonial Plugin - HmTestimonial

WordPress plugin WordPress Testimonial Plugin - HmTestimonial scored83%from 54 tests.

About plugin

  • Plugin page: hm-testimonial
  • Plugin version: 1.4
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0.2
  • WordPress version: 6.3.1
  • First release: Jul 17, 2021
  • Latest release: Jun 3, 2023
  • Number of updates: 28
  • Update frequency: every 24.5 days
  • Top authors: mhmrajib (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /635 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.37ms] Passed 4 tests

An overview of server-side resources used by WordPress Testimonial Plugin - HmTestimonial
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0735.28 ▼5.56
Dashboard /wp-admin3.36 ▲0.0644.34 ▼2.62
Posts /wp-admin/edit.php3.47 ▲0.1242.40 ▼3.48
Add New Post /wp-admin/post-new.php5.96 ▲0.0879.87 ▼13.83
Media Library /wp-admin/upload.php3.28 ▲0.0535.88 ▲1.69
Add New /wp-admin/post-new.php?post_type=hm_testimonial3.4349.85
Testimonial Categories /wp-admin/edit-tags.php?taxonomy=hm_testimonial_category&post_type=hm_testimonial3.2834.43
Manage Views /wp-admin/edit.php?post_type=hm_testimonial&page=hmt-manage-views3.3033.31
Usage & Tutorial /wp-admin/edit.php?post_type=hm_testimonial&page=hmt-get-help3.2731.46
All Testimonials /wp-admin/edit.php?post_type=hm_testimonial3.3244.82

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WordPress Testimonial Plugin - HmTestimonial
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,957 ▲20014.04 ▼0.555.02 ▲3.0239.04 ▼6.76
Dashboard /wp-admin2,268 ▲805.08 ▲0.18111.37 ▼6.0838.92 ▼7.80
Posts /wp-admin/edit.php2,153 ▲642.28 ▲0.2636.92 ▼2.4630.73 ▲0.49
Add New Post /wp-admin/post-new.php1,574 ▲4118.46 ▼4.59636.07 ▼24.7635.86 ▼14.55
Media Library /wp-admin/upload.php1,447 ▲564.41 ▲0.14103.90 ▲2.3042.28 ▼2.43
Add New /wp-admin/post-new.php?post_type=hm_testimonial2,5117.80215.4970.35
Testimonial Categories /wp-admin/edit-tags.php?taxonomy=hm_testimonial_category&post_type=hm_testimonial1,3322.0531.9528.02
Manage Views /wp-admin/edit.php?post_type=hm_testimonial&page=hmt-manage-views1,0141.9725.9935.47
Usage & Tutorial /wp-admin/edit.php?post_type=hm_testimonial&page=hmt-get-help1,4639.81278.2375.96
All Testimonials /wp-admin/edit.php?post_type=hm_testimonial1,1252.2235.8429.75

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • 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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/hm-testimonial/admin/view/hmt-help-usage.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 19 tag instead of maximum 10
  • Screenshots: Please add descriptions for these screenshots #2, #3, #4 in hm-testimonial/assets to your readme.txt
The official readme.txt is a good inspiration

hm-testimonial/hm-testimonial.php Passed 13 tests

The main PHP file in "WordPress Testimonial Plugin - HmTestimonial" ver. 1.4 adds more information about the plugin and also serves as the entry point for this plugin
119 characters long description:
This Testimonial Plugin will display testimonials in your website page or post by using the shortcode: [hm_testimonial]

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected40,950 lines of code in 181 files:
LanguageFilesBlank linesComment linesLines of code
PHP1267,45516,14231,383
CSS16122502,820
SVG1002,671
Sass1536361,796
LESS1536461,786
JavaScript64266253
Markdown1680214
JSON10027

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 2,910)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity77.66
▷ Minimum class complexity1.00
▷ Maximum class complexity2,910.00
Average method complexity4.57
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits4
Classes49
▷ Abstract classes24.08%
▷ Concrete classes4795.92%
▷ Final classes00.00%
Methods1,171
▷ Static methods17314.77%
▷ Public methods81669.68%
▷ Protected methods272.31%
▷ Private methods32828.01%
Functions99
▷ Named functions99100.00%
▷ Anonymous functions00.00%
Constants130
▷ Global constants10580.77%
▷ Class constants2519.23%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
assets/css/images/bg_direction_nav.png1.82KB0.79KB▼ 56.38%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%