73% 4ecps-webforms

Code Review | 4ECPS Web Forms

WordPress plugin 4ECPS Web Forms scored73%from 54 tests.

About plugin

  • Plugin page: 4ecps-webforms
  • Plugin version: 0.2.18
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-6.0.2
  • WordPress version: 6.3.1
  • First release: Sep 8, 2017
  • Latest release: Nov 7, 2022
  • Number of updates: 49
  • Update frequency: every 38.5 days
  • Top authors: jumpdemand (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,473 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.28MB] [CPU: ▲514.73ms] 50% from 4 tests

An overview of server-side resources used by 4ECPS Web Forms
Please have a look at the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 777.60ms on /wp-admin/options-general.php?page=ecps_options)
  • Extra CPU: The extra CPU usage must be under 200.00ms (currently 514.73ms on /wp-admin/options-general.php?page=ecps_options)
PageMemory (MB)CPU Time (ms)
Home /4.30 ▲0.5758.39 ▲9.85
Dashboard /wp-admin4.12 ▲0.49802.98 ▲731.23
Posts /wp-admin/edit.php4.24 ▲0.56714.20 ▲660.19
Add New Post /wp-admin/post-new.php5.64 ▼0.50865.51 ▲763.14
Media Library /wp-admin/upload.php4.05 ▲0.56696.26 ▲657.66
4ECPS /wp-admin/options-general.php?page=ecps_options4.02777.60

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 25 new files
Database: 4 new tables, 7 new options
New tables
wp_activedemand_access
wp_cart
wp_cart_product
wp_activedemand_access_rule
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
ecps_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for 4ECPS Web Forms
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,882 ▲12113.57 ▼0.688.16 ▲6.3845.19 ▲1.35
Dashboard /wp-admin2,206 ▲295.62 ▲0.0889.63 ▼11.4140.32 ▼6.01
Posts /wp-admin/edit.php2,114 ▲142.07 ▲0.0438.94 ▼1.8031.92 ▼4.14
Add New Post /wp-admin/post-new.php1,714 ▲18321.95 ▼1.54702.75 ▼46.1136.46 ▼15.95
Media Library /wp-admin/upload.php1,414 ▲144.23 ▼0.02101.23 ▼16.3143.83 ▼5.78
4ECPS /wp-admin/options-general.php?page=ecps_options9211.7425.8526.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 4 tables in the database
    • wp_cart_product
    • wp_cart
    • wp_activedemand_access
    • wp_activedemand_access_rule
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • ecps_version
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means 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
Almost there! Just fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ecps\\add_action() in wp-content/plugins/4ecps-webforms/linked-forms.php:663
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/4ecps-webforms/partials/tinymce-editor.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ecps\\plugin_dir_path() in wp-content/plugins/4ecps-webforms/4ECPS.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ecps\\add_shortcode() in wp-content/plugins/4ecps-webforms/class-SCCollector.php:124

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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 need to be fixed: The official readme.txt might help

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

Analyzing the main PHP file in "4ECPS Web Forms" version 0.2.18
Please take the time to fix the following:
  • Main file name: Name the main plugin file 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 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected3,160 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP55351072,875
JavaScript114022283
CSS2072

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity86.00
▷ Minimum class complexity10.00
▷ Maximum class complexity162.00
Average method complexity2.62
▷ 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%
Functions70
▷ Named functions6491.43%
▷ Anonymous functions68.57%
Constants7
▷ Global constants7100.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
6 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ActiveDEMAND-Transparent.png4.54KB2.86KB▼ 36.98%
images/favicon.png2.08KB1.60KB▼ 22.96%
images/Screenshot1.png40.05KB13.61KB▼ 66.01%
images/Screenshot3.png9.80KB4.39KB▼ 55.16%
includes/icons/favicon.png2.08KB1.60KB▼ 22.96%