83% curious-brains-gf-hubspot-addon

Code Review | Curious Brains GF HubSpot Addon

WordPress plugin Curious Brains GF HubSpot Addon scored83%from 54 tests.

About plugin

  • Plugin page: curious-brains-gf...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1
  • WordPress version: 6.3.1
  • First release: Jun 7, 2023
  • Latest release: Jun 7, 2023
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: gauravpareekk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /335 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.72ms] Passed 4 tests

Analyzing server-side resources used by Curious Brains GF HubSpot Addon
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0045.04 ▲3.21
Dashboard /wp-admin3.31 ▲0.0052.49 ▲0.19
Posts /wp-admin/edit.php3.36 ▲0.0054.24 ▼2.95
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.06 ▼9.34
Media Library /wp-admin/upload.php3.23 ▲0.0038.42 ▲1.22

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

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

Browser metrics Passed 4 tests

Curious Brains GF HubSpot Addon: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.431.80 ▲0.1839.99 ▼1.07
Dashboard /wp-admin2,195 ▲215.65 ▼0.0185.79 ▼7.3241.74 ▲3.78
Posts /wp-admin/edit.php2,100 ▼31.99 ▼0.0336.97 ▼6.1037.26 ▼1.80
Add New Post /wp-admin/post-new.php1,526 ▼023.28 ▼0.21640.46 ▼46.2247.67 ▼13.02
Media Library /wp-admin/upload.php1,403 ▼04.27 ▲0.1098.33 ▼8.7642.70 ▼3.43

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 were found after uninstall: 8 options
    • theysaidso_admin_options
    • widget_recent-comments
    • hubspot_table_name2
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • hubspot_table_name1
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'GFForms' not found in wp-content/plugins/curious-brains-gf-hubspot-addon/GFHubspotAddOn.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/curious-brains-gf-hubspot-addon/gf_hubspot_addon.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

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
These attributes need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === curious-brains-gf-hubspot-addon === )
The official readme.txt might help

curious-brains-gf-hubspot-addon/gf_hubspot_addon.php 85% from 13 tests

The entry point to "Curious Brains GF HubSpot Addon" version 1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("curious-brains-gf-hubspot-addon.php" instead of "gf_hubspot_addon.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin2,341 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP23691092,066
CSS150134
JavaScript1325103
Markdown119037
SVG1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity50.50
▷ Minimum class complexity2.00
▷ Maximum class complexity99.00
Average method complexity10.90
▷ Minimum method complexity1.00
▷ Maximum method complexity74.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods220.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin