83% asemt-leadform-hook

Code Review | ASEMT Leadform Hook for Google Ads

WordPress plugin ASEMT Leadform Hook for Google Ads scored83%from 54 tests.

About plugin

  • Plugin page: asemt-leadform-hook
  • Plugin version: 1.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6.4-5.9.1
  • WordPress version: 6.3.1
  • First release: Feb 8, 2022
  • Latest release: Mar 9, 2022
  • Number of updates: 7
  • Update frequency: every 4.1 days
  • Top authors: sebastianoffers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /706 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.69ms] Passed 4 tests

An overview of server-side resources used by ASEMT Leadform Hook for Google Ads
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.96 ▼2.77
Dashboard /wp-admin3.35 ▲0.0153.86 ▼11.93
Posts /wp-admin/edit.php3.40 ▲0.0547.50 ▼4.72
Add New Post /wp-admin/post-new.php5.93 ▲0.0586.73 ▼3.35
Media Library /wp-admin/upload.php3.27 ▲0.0537.89 ▲1.76

Server storage [IO: ▲4.96MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
  • You have illegally modified 1 file (4.00KB) outside of "wp-content/plugins/asemt-leadform-hook/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for ASEMT Leadform Hook for Google Ads
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲7714.74 ▲0.361.92 ▲0.0043.07 ▲0.09
Dashboard /wp-admin2,233 ▲335.77 ▲0.7297.25 ▼14.2340.99 ▼1.18
Posts /wp-admin/edit.php2,112 ▲91.99 ▼0.0033.91 ▼0.0933.96 ▲2.15
Add New Post /wp-admin/post-new.php1,555 ▲2423.28 ▼0.00666.75 ▼61.2356.21 ▼3.54
Media Library /wp-admin/upload.php1,412 ▲124.30 ▲0.0699.80 ▼20.2143.41 ▼6.87

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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
Please take a closer look at the following
  • 3× 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/asemt-leadform-hook/class/menu.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/asemt-leadform-hook/ajax/ajax.php:101
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/asemt-leadform-hook/options.php:64

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid URI: ""
The official readme.txt is a good inspiration

asemt-leadform-hook/asemt_leadform_hook.php 92% from 13 tests

The main PHP script in "ASEMT Leadform Hook for Google Ads" version 1.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("asemt-leadform-hook.php" instead of "asemt_leadform_hook.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
No dangerous file extensions were detected46,890 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript37,4844,80946,270
CSS4151311
PHP410223309

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods3100.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
No PNG images were found in this plugin