83% mhstudio-hubspotform

Code Review | Mhstudio Hubspot Form Popup

WordPress plugin Mhstudio Hubspot Form Popup scored83%from 54 tests.

About plugin

  • Plugin page: mhstudio-hubspotform
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.8
  • WordPress version: 6.3.1
  • First release: Feb 21, 2018
  • Latest release: Aug 6, 2021
  • Number of updates: 10
  • Update frequency: every 126.2 days
  • Top authors: mayankkh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,048 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼4.58ms] Passed 4 tests

Analyzing server-side resources used by Mhstudio Hubspot Form Popup
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1036.35 ▼6.25
Dashboard /wp-admin3.41 ▲0.1046.21 ▲2.86
Posts /wp-admin/edit.php3.52 ▲0.1649.94 ▲5.49
Add New Post /wp-admin/post-new.php6.01 ▲0.1289.44 ▼16.61
Media Library /wp-admin/upload.php3.33 ▲0.1035.76 ▲1.69

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

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

Browser metrics Passed 4 tests

Mhstudio Hubspot Form Popup: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,933 ▲18713.60 ▼0.396.42 ▲4.6137.39 ▼7.05
Dashboard /wp-admin2,222 ▲395.90 ▲0.95103.91 ▼2.2039.42 ▼4.29
Posts /wp-admin/edit.php2,108 ▲192.03 ▲0.0239.99 ▼2.1135.39 ▲1.03
Add New Post /wp-admin/post-new.php1,532 ▲1823.27 ▲5.84682.60 ▲76.8058.65 ▲3.67
Media Library /wp-admin/upload.php1,404 ▲194.24 ▲0.05100.81 ▲1.6843.28 ▲0.72

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

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 everything seems fine, this is not 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 take a closer look at the following
  • 14× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/mhstudio-hubspotform/public/partials/mhs-hubspotform-public-display.php on line 52
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/mhstudio-hubspotform/public/partials/mhs-hubspotform-public-display.php on line 50
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/mhstudio-hubspotform/public/partials/mhs-hubspotform-public-display.php on line 52
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/mhstudio-hubspotform/public/partials/mhs-hubspotform-public-display.php on line 54
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/mhstudio-hubspotform/public/partials/mhs-hubspotform-public-display.php on line 55
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/mhstudio-hubspotform/public/partials/mhs-hubspotform-public-display.php on line 53
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/mhstudio-hubspotform/public/partials/mhs-hubspotform-public-display.php on line 51
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/mhstudio-hubspotform/public/partials/mhs-hubspotform-public-display.php on line 51
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/mhstudio-hubspotform/admin/partials/mhs-hubspotform-admin-display.php:18
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/mhstudio-hubspotform/public/partials/mhs-hubspotform-public-display.php on line 55

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes: You can take inspiration from this readme.txt

mhstudio-hubspotform/mhs_hubspotform.php 85% from 13 tests

This is the main PHP file of "Mhstudio Hubspot Form Popup" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: The principal plugin file should be the same as the plugin slug ("mhstudio-hubspotform.php" instead of "mhs_hubspotform.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected940 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
CSS34416508
PHP12148561425
JavaScript34567

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity3.86
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.47
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods43
▷ Static methods24.65%
▷ Public methods3888.37%
▷ Protected methods00.00%
▷ Private methods511.63%
Functions3
▷ Named functions3100.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
images/leadin-icon-16x16-white.png0.40KB0.55KB0.00%