83% helloleads-cf7-form

Code Review | HelloLeads CF7 Form

WordPress plugin HelloLeads CF7 Form scored 83% from 54 tests.

About plugin

  • Plugin page: helloleads-cf7-form
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0.1
  • WordPress version: 6.3.1
  • First release: Oct 8, 2022
  • Latest release: Nov 11, 2022
  • Number of updates: 6
  • Update frequency: every 5.8 days
  • Top authors: helloleads (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 567 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.01ms] Passed 4 tests

A check of server-side resources used by HelloLeads CF7 Form
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0942.13 ▼1.13
Dashboard /wp-admin3.39 ▲0.0949.03 ▼9.44
Posts /wp-admin/edit.php3.50 ▲0.1548.26 ▼2.56
Add New Post /wp-admin/post-new.php5.99 ▲0.1086.43 ▼6.91
Media Library /wp-admin/upload.php3.31 ▲0.0836.36 ▲4.02

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

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

Browser metrics Passed 4 tests

HelloLeads CF7 Form: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲11555.64 ▲41.261.70 ▼0.8540.86 ▼1.99
Dashboard /wp-admin2,056 ▼13223.82 ▲17.93436.20 ▲330.2070.89 ▲4.19
Posts /wp-admin/edit.php2,139 ▲5044.34 ▲42.33280.10 ▲242.4558.07 ▲27.95
Add New Post /wp-admin/post-new.php1,636 ▲12236.96 ▲19.43879.78 ▲185.3025.37 ▼32.79
Media Library /wp-admin/upload.php1,502 ▲11447.23 ▲43.04347.94 ▲248.5781.35 ▲34.57

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means 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 fix the following items
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/helloleads-cf7-form/inc/template/header.php:4
    • > PHP Warning
      Use of undefined constant HLOL_US_PLUGIN_DIR - assumed 'HLOL_US_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/helloleads-cf7-form/inc/template/view/hls_list.php on line 2
    • > PHP Warning
      require_once(HLOL_US_PLUGIN_DIR/inc/template/header.php): failed to open stream: No such file or directory in wp-content/plugins/helloleads-cf7-form/inc/template/view/config.php on line 2
    • > PHP Warning
      Use of undefined constant HLOL_US_PLUGIN_DIR - assumed 'HLOL_US_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/helloleads-cf7-form/inc/template/view/config.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'HLOL_US_PLUGIN_DIR/inc/template/header.php' (include_path='.:/usr/share/php') in wp-content/plugins/helloleads-cf7-form/inc/template/view/hls_list.php on line 2
    • > PHP Warning
      require_once(HLOL_US_PLUGIN_DIR/inc/template/header.php): failed to open stream: No such file or directory in wp-content/plugins/helloleads-cf7-form/inc/template/view/hls_list.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/helloleads-cf7-form/inc/loader.php:18
    • > PHP Fatal error
      require_once(): Failed opening required 'HLOL_US_PLUGIN_DIR/inc/template/header.php' (include_path='.:/usr/share/php') in wp-content/plugins/helloleads-cf7-form/inc/template/view/config.php on line 2

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Requires php: The plugin version is formatted incorrectly
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === helloleads-cf7-form === )
You can take inspiration from this readme.txt

helloleads-cf7-form/helloleads.php 77% from 13 tests

The main PHP file in "HelloLeads CF7 Form" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("helloleads-cf7-form.php" instead of "helloleads.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 175 characters long)
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

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
There were no executable files found in this plugin2,586 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript103612731,870
PHP533368476
CSS5525240

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity56.00
▷ Minimum class complexity56.00
▷ Maximum class complexity56.00
Average method complexity4.93
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
5 PNG files occupy 0.31MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png81.07KB23.52KB▼ 70.99%
inc/template/img/icon.png1.02KB0.71KB▼ 30.10%
assets/screenshot-1.png83.08KB26.51KB▼ 68.09%
assets/icon-128x128.png12.21KB6.63KB▼ 45.66%
inc/template/img/HLS_Logo.png136.32KB29.58KB▼ 78.30%