73% 4ecps-webforms

Code Review | 4ECPS Web Forms

WordPress plugin 4ECPS Web Forms scored 73% from 54 tests.

About plugin

  • Plugin page: 4ecps-webforms
  • Plugin version: 0.2.17
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-5.7.2
  • WordPress version: 5.9.2
  • First release: Sep 8, 2017
  • Latest release: Jun 9, 2021
  • Number of updates: 44
  • Update frequency: every 31.2 days
  • Top authors: jumpdemand (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,123 total downloads

Benchmarks

Plugin footprint 64% 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.17MB] [CPU: ▲266.13ms] 50% from 4 tests

A check of server-side resources used by 4ECPS Web Forms
The following require your attention
  • CPU: Try to keep total CPU usage under 500.00ms (currently 779.96ms on /wp-admin/options-general.php?page=ecps_options)
  • Extra CPU: The extra CPU usage should be kept under 200.00ms (currently 266.13ms on /wp-admin/options-general.php?page=ecps_options)
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.4361.24 ▲10.16
Dashboard /wp-admin3.83 ▲0.39874.32 ▲840.92
Posts /wp-admin/edit.php4.13 ▲0.46784.88 ▲746.01
Add New Post /wp-admin/post-new.php6.39 ▼0.62859.49 ▼397.46
Media Library /wp-admin/upload.php3.78 ▲0.46731.00 ▲705.81
4ECPS /wp-admin/options-general.php?page=ecps_options3.75779.96

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 25 new files
Database: 2 new tables, 1 new option
New tables
wp_cart_product
wp_cart
New WordPress options
ecps_version

Browser metrics Passed 4 tests

A check of browser resources used by 4ECPS Web Forms
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,067 ▲32117.81 ▲2.2237.68 ▲31.927.42 ▲5.36
Dashboard /wp-admin2,908 ▲476.32 ▲0.24120.35 ▼18.61159.64 ▼2.12
Posts /wp-admin/edit.php2,707 ▲133.28 ▲0.0564.03 ▼0.09142.48 ▼2.79
Add New Post /wp-admin/post-new.php1,731 ▼2120.53 ▼1.17420.05 ▼31.48154.96 ▲2.05
Media Library /wp-admin/upload.php1,714 ▲195.59 ▲0.07129.72 ▼8.02179.12 ▼9.31
4ECPS /wp-admin/options-general.php?page=ecps_options1,2362.7555.92117.15

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie tables detected upon uninstall: 2 tables
    • wp_cart_product
    • wp_cart
  • This plugin does not fully uninstall, leaving 1 option in the database
    • ecps_version

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ecps\\add_shortcode() in wp-content/plugins/4ecps-webforms/class-SCCollector.php:123
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_get_page_id() in wp-content/plugins/4ecps-webforms/recover-cart.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ecps\\add_action() in wp-content/plugins/4ecps-webforms/landing-pages.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ecps\\add_action() in wp-content/plugins/4ecps-webforms/linked-forms.php:495
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ecps\\plugin_dir_path() in wp-content/plugins/4ecps-webforms/4ECPS.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/4ecps-webforms/partials/tinymce-editor.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

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 to be fixed: You can look at the official readme.txt

4ecps-webforms/4ECPS.php 92% from 13 tests

"4ECPS Web Forms" version 0.2.17's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("4ecps-webforms.php" instead of "4ECPS.php")

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
Good job! No executable or dangerous file extensions detected2,306 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP73841032,023
JavaScript104018282
CSS1071

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity63.00
▷ Minimum class complexity10.00
▷ Maximum class complexity116.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods26
▷ Static methods934.62%
▷ Public methods2492.31%
▷ Protected methods00.00%
▷ Private methods27.69%
Functions73
▷ Named functions6791.78%
▷ Anonymous functions68.22%
Constants14
▷ Global constants14100.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
6 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/Screenshot1.png40.05KB13.61KB▼ 66.01%
images/Screenshot3.png9.80KB4.39KB▼ 55.16%
includes/icons/favicon.png2.08KB1.60KB▼ 22.96%
images/favicon.png2.08KB1.60KB▼ 22.96%
images/Screenshot2.png26.52KB9.78KB▼ 63.13%