73% foreup-forms

Code Review | foreUP Forms

WordPress plugin foreUP Forms scored 73% from 54 tests.

About plugin

  • Plugin page: foreup-forms
  • Plugin version: 1.2.9
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.2
  • WordPress version: 5.9.2
  • First release: Mar 8, 2019
  • Latest release: Mar 9, 2021
  • Number of updates: 40
  • Update frequency: every 18.3 days
  • Top authors: foreupsoftware (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 2,074 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
Installer ran successfully

Server metrics [RAM: ▼2.23MB] [CPU: ▲555.45ms] 50% from 4 tests

Server-side resources used by foreUP Forms
Please have a look at the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 890.20ms on /wp-admin/options-general.php?page=formup)
  • Extra CPU: Extra CPU usage must be kept under 200.00ms (currently 555.45ms on /wp-admin/options-general.php?page=formup)
PageMemory (MB)CPU Time (ms)
Home /2.15 ▼1.37932.31 ▲881.34
Dashboard /wp-admin2.17 ▼1.25937.72 ▲906.18
Posts /wp-admin/edit.php2.17 ▼1.48890.27 ▲854.66
Add New Post /wp-admin/post-new.php2.17 ▼4.81895.66 ▼370.55
Media Library /wp-admin/upload.php2.17 ▼1.13879.95 ▲856.33
foreUP Forms Configurations /wp-admin/options-general.php?page=formup2.17890.20

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 334 new files
Database: no new tables, 31 new options
New WordPress options
formup_recaptcha_key
formup_email_pic_url
formup_group
formup_address2_required
formup_state
formup_account_counter
formup_cell_phone_required
formup_city
formup_address2
formup_address1
...

Browser metrics Passed 4 tests

foreUP Forms: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,769 ▲1515.88 ▲0.247.03 ▲0.972.68 ▲0.34
Dashboard /wp-admin2,897 ▲366.08 ▼0.08120.65 ▼12.84156.24 ▼3.78
Posts /wp-admin/edit.php2,693 ▼12.99 ▼0.2464.60 ▲2.06141.01 ▼5.25
Add New Post /wp-admin/post-new.php2,048 ▲38718.75 ▲3.19439.98 ▲3.54146.21 ▼13.99
Media Library /wp-admin/upload.php1,703 ▲55.44 ▼0.11148.35 ▲3.55174.92 ▼10.07
foreUP Forms Configurations /wp-admin/options-general.php?page=formup1,4592.5454.36117.53

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
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/foreup-forms/plugin.php+313
    Undefined property: stdClass::$data
  • This plugin does not fully uninstall, leaving 31 options in the database
    • formup_address2_required
    • formup_home_phone_required
    • formup_state
    • formup_email_body
    • formup_account_counter
    • formup_courseid
    • formup_token
    • formup_cell_phone_required
    • formup_city_required
    • formup_city
    • ...

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=formup
    • > Notice in wp-content/plugins/foreup-forms/plugin.php+313
    Undefined property: stdClass::$data
    • > GET request to /wp-admin/options-general.php?page=formup
    • > Notice in wp-content/plugins/foreup-forms/plugin.php+313
    Trying to get property 'id' of non-object
    • > GET request to /wp-admin/options-general.php?page=formup
    • > User deprecated in wp-includes/functions.php+5326
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=formup
    • > User deprecated in wp-includes/functions.php+5326
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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
Please fix the following attributes:
  • Donate link: Invalid url: ""
You can take inspiration from this readme.txt

foreup-forms/plugin.php 85% from 13 tests

The principal PHP file in "foreUP Forms" v. 1.2.9 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("foreup-forms.php" instead of "plugin.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
No dangerous file extensions were detected119,696 lines of code in 320 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript27813,30316,43199,358
JSON90016,275
Markdown1150901,473
PHP51372451,102
Vuejs Component15433763
TypeScript1211028723
CSS4242

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity10.00
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods37
▷ Static methods12.70%
▷ Public methods3594.59%
▷ Protected methods00.00%
▷ Private methods25.41%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png21.68KB7.19KB▼ 66.85%