84% cubewp-forms

Code Review | CubeWP Forms - LeadGen & Contact Form

WordPress plugin CubeWP Forms - LeadGen & Contact Form scored84%from 54 tests.

About plugin

  • Plugin page: cubewp-forms
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Dec 16, 2022
  • Latest release: Oct 27, 2023
  • Number of updates: 29
  • Update frequency: every 10.9 days
  • Top authors: cubewp1211 (96.55%)teamcubewp (6.9%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /5,606 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.21ms] Passed 4 tests

A check of server-side resources used by CubeWP Forms - LeadGen & Contact Form
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0139.34 ▲1.25
Dashboard /wp-admin3.32 ▲0.0144.62 ▼7.53
Posts /wp-admin/edit.php3.37 ▲0.0144.40 ▲0.43
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.54 ▼10.22
Media Library /wp-admin/upload.php3.24 ▲0.0136.23 ▲0.49

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for CubeWP Forms - LeadGen & Contact Form
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6514.35 ▲0.081.99 ▲0.2245.09 ▲2.56
Dashboard /wp-admin2,207 ▲305.50 ▼0.0484.58 ▼3.6637.47 ▼3.73
Posts /wp-admin/edit.php2,113 ▲131.99 ▲0.0233.49 ▼2.8934.07 ▼0.62
Add New Post /wp-admin/post-new.php1,538 ▲1023.03 ▲0.02647.54 ▼12.7247.56 ▼7.81
Media Library /wp-admin/upload.php1,409 ▲124.28 ▲0.10104.67 ▲9.8548.39 ▲3.84

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cubewp-forms/cube/functions/functions.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: "NA"
  • Tags: You are using too many tags: 13 tag instead of maximum 10
The official readme.txt is a good inspiration

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

Analyzing the main PHP file in "CubeWP Forms - LeadGen & Contact Form" version 1.0.5
75 characters long description:
LeadGen & Contact Form by CubeWP – Drag & Drop Form Builder for WordPress

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,576 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP102086952,047
CSS3193450
JavaScript211079

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity35.50
▷ Minimum class complexity4.00
▷ Maximum class complexity100.00
Average method complexity4.78
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods73
▷ Static methods3446.58%
▷ Public methods6183.56%
▷ Protected methods79.59%
▷ Private methods56.85%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.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.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
cube/assets/images/cwp-dashboard-leads.png9.53KB3.95KB▼ 58.53%