83% public-form-leads

Code Review | Public Form Leads

WordPress plugin Public Form Leads scored 83% from 54 tests.

About plugin

  • Plugin page: public-form-leads
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Jun 23, 2022
  • Latest release: Jun 23, 2022
  • Number of updates: 6
  • Update frequency: every 0.5 days
  • Top authors: ma7moud3id89 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 154 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
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.95ms] Passed 4 tests

A check of server-side resources used by Public Form Leads
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.45 ▼4.27
Dashboard /wp-admin3.34 ▲0.0444.79 ▼8.72
Posts /wp-admin/edit.php3.39 ▲0.0448.07 ▲3.52
Add New Post /wp-admin/post-new.php5.92 ▲0.0492.73 ▼2.32
Media Library /wp-admin/upload.php3.26 ▲0.0436.98 ▲3.94

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

Filesystem and database footprint
These are issues you should consider
  • Illegal file modification detected: 1 file (1.35KB) outside of "wp-content/plugins/public-form-leads/" and "wp-content/uploads/"
    • (new file) wp-content/themes/twentytwentyone/template-page-marketing.php
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Public Form Leads: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲9113.22 ▼1.181.96 ▼0.2841.17 ▼4.60
Dashboard /wp-admin2,226 ▲385.88 ▲1.0197.15 ▼22.3438.31 ▼6.25
Posts /wp-admin/edit.php2,112 ▲262.02 ▼0.0240.19 ▲6.8036.46 ▲3.21
Add New Post /wp-admin/post-new.php1,548 ▲1423.21 ▼0.07636.93 ▼69.3952.68 ▼0.92
Media Library /wp-admin/upload.php1,405 ▲174.35 ▼0.0497.28 ▼15.0843.90 ▼2.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • ct_license_code
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/public-form-leads/inc/active-license.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/public-form-leads/templates/template-page-marketing.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/public-form-leads/included.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_theme() in wp-content/plugins/public-form-leads/index.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/public-form-leads/inc/shortcode.php:189
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/public-form-leads/inc/cearte-page.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/public-form-leads/inc/create-single-form.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Active plugin Public Form Lead), #2 (Go Page Track Leads), #3 (select all sections and submit)
Please take inspiration from this readme.txt

public-form-leads/index.php 92% from 13 tests

Analyzing the main PHP file in "Public Form Leads" version 1.0.2
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("public-form-leads.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected904 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP75720427
CSS1520298
JavaScript1237179

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ 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 methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 1.20MB with 0.98MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/images/screen-shot-2.png448.39KB108.58KB▼ 75.78%
inc/images/custom-1.png41.02KB7.59KB▼ 81.49%
inc/images/custom-3.png36.51KB7.25KB▼ 80.15%
inc/images/custom-2.png351.15KB23.41KB▼ 93.33%
inc/images/screen-shot-1.png351.72KB79.53KB▼ 77.39%