68% icontact-forms

Code Review | iContact Lead Forms

WordPress plugin iContact Lead Forms scored68%from 54 tests.

About plugin

  • Plugin page: icontact-forms
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 3, 2023
  • Latest release: Apr 7, 2023
  • Number of updates: 14
  • Update frequency: every 7.0 days
  • Top authors: icontactj2 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /487 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.45MB] [CPU: ▼4.00ms] Passed 4 tests

An overview of server-side resources used by iContact Lead Forms
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.97 ▲0.5151.86 ▲4.53
Dashboard /wp-admin3.79 ▲0.4554.56 ▼19.61
Posts /wp-admin/edit.php3.85 ▲0.4953.59 ▲1.54
Add New Post /wp-admin/post-new.php6.34 ▲0.4599.15 ▼2.47
Media Library /wp-admin/upload.php3.65 ▲0.4347.33 ▲11.31
About /wp-admin/admin.php?page=icontact-forms-about3.6339.66
iContact Forms /wp-admin/options-general.php?page=icontact-forms3.6350.19
Forms /wp-admin/admin.php?page=icontact-forms-forms3.6637.85
Settings /wp-admin/admin.php?page=icontact-forms-settings3.6338.61

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 42 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for iContact Lead Forms
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,002 ▲24113.86 ▼0.398.23 ▲6.3344.11 ▲1.67
Dashboard /wp-admin2,317 ▲1375.58 ▲0.0591.68 ▼3.2145.11 ▲2.47
Posts /wp-admin/edit.php2,233 ▲1362.18 ▲0.1844.17 ▲7.5239.40 ▲4.00
Add New Post /wp-admin/post-new.php6,460 ▲4,93422.59 ▼0.41860.52 ▲228.9241.70 ▼10.82
Media Library /wp-admin/upload.php1,528 ▲1284.18 ▼0.0399.17 ▼2.0442.81 ▲0.11
About /wp-admin/admin.php?page=icontact-forms-about1,4649.29296.7961.79
iContact Forms /wp-admin/options-general.php?page=icontact-forms1,0261.6527.7733.56
Forms /wp-admin/admin.php?page=icontact-forms-forms1,1991.7427.4633.10
Settings /wp-admin/admin.php?page=icontact-forms-settings1,0261.8323.9531.80

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Incomplete uninstall procedure, leaving 42 files (0.18MB) in the plugin directory
    • (new file) admin/class-icontact-forms-forms-table.php
    • (new file) admin/images/apple-icon-152x152.png
    • (new file) admin/images/icontact-icon-blue.svg
    • (new file) admin/images/apple-icon-152x152.svg
    • (new file) LICENSE.txt
    • (new file) admin/css/icontact-forms-admin.css
    • (new file) admin/images/icontact-pc-logo-top-menu.svg
    • (new file) README.txt
    • (new file) admin/class-icontact-forms-admin.php
    • (new file) admin/index.php
    • ...
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/icontact-forms/admin/class-icontact-forms-forms-table.php on line 15
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/icontact-forms/admin/class-icontact-forms-forms-table.php on line 15
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/icontact-forms/admin/class-icontact-forms-forms-table.php on line 15

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=icontact-forms-about
    • > Other (warning) in unknown
    /wp-admin/admin.php?page=icontact-forms-about 203 Unrecognized feature: 'web-share'.

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: icontact forms, newsletter, forms, email, marketing...

icontact-forms/icontact-forms.php Passed 13 tests

The principal PHP file in "iContact Lead Forms" v. 1.0.1 is loaded by WordPress automatically on each request
102 characters long description:
The official iContact plugin to add iContact forms to your WordPress site and grow your mailing lists.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin2,610 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP243791,8211,879
JavaScript347155375
CSS45520275
SVG31141
JSON10040

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity17.64
▷ Minimum class complexity1.00
▷ Maximum class complexity87.00
Average method complexity2.91
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods118
▷ Static methods54.24%
▷ Public methods10488.14%
▷ Protected methods43.39%
▷ Private methods108.47%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants10
▷ Global constants10100.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 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/apple-icon-152x152.png7.15KB3.52KB▼ 50.81%