74% wp-simple-forms

Code Review | WP Simple Forms

WordPress plugin WP Simple Forms scored74%from 54 tests.

About plugin

  • Plugin page: wp-simple-forms
  • Plugin version: 0.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.4
  • WordPress version: 6.3.1
  • First release: Dec 1, 2012
  • Latest release: Jan 2, 2013
  • Number of updates: 30
  • Update frequency: every 1.1 days
  • Top authors: delaney.p.brown (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,504 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼2.79ms] Passed 4 tests

An overview of server-side resources used by WP Simple Forms
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1244.13 ▼2.16
Dashboard /wp-admin3.43 ▲0.1252.20 ▼4.25
Posts /wp-admin/edit.php3.54 ▲0.1852.48 ▲2.96
Add New Post /wp-admin/post-new.php6.01 ▲0.1286.92 ▼7.72
Media Library /wp-admin/upload.php3.35 ▲0.1244.10 ▲11.82

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 29 new files
Database: 4 new tables, 7 new options
New tables
wp_wpsf_attendee_custom_question
wp_wpsf_question
wp_wpsf_template
wp_wpsf_question_option
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
wpsf_db_version

Browser metrics Passed 4 tests

Checking browser requirements for WP Simple Forms
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲5014.35 ▼0.281.79 ▼0.1442.84 ▼7.77
Dashboard /wp-admin2,220 ▲465.62 ▼0.0396.76 ▼3.1640.99 ▼2.04
Posts /wp-admin/edit.php2,126 ▲262.21 ▲0.2135.09 ▼3.3734.88 ▲1.82
Add New Post /wp-admin/post-new.php1,545 ▲1723.61 ▲0.42650.15 ▼46.0065.39 ▲6.28
Media Library /wp-admin/upload.php1,422 ▲224.18 ▼0.02103.16 ▲0.1845.98 ▲1.17

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 4 tables in the database
    • wp_wpsf_template
    • wp_wpsf_question_option
    • wp_wpsf_question
    • wp_wpsf_attendee_custom_question
  • Zombie WordPress options detected upon uninstall: 7 options
    • wpsf_db_version
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-simple-forms/functions.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-simple-forms/wpsf_settings.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-simple-forms/ajax.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-simple-forms/shortcode.php:44

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
1 plugin tags: wp simple forms

wp-simple-forms/wp_simple_forms.php 85% from 13 tests

The entry point to "WP Simple Forms" version 0.1.4 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 150 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-simple-forms.php" instead of "wp_simple_forms.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin2,857 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript41622621,625
PHP796156801
CSS333150431

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity9.50
▷ Minimum class complexity2.00
▷ Maximum class complexity21.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
14 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
plugins/jquery-ui/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png0.09KB0.14KB0.00%
plugins/jquery-ui/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png0.25KB0.15KB▼ 39.62%
plugins/jquery-ui/css/ui-lightness/images/ui-icons_ffd27a_256x240.png4.27KB4.11KB▼ 3.78%
plugins/jquery-ui/css/ui-lightness/images/ui-icons_ffffff_256x240.png4.27KB4.11KB▼ 3.78%
plugins/jquery-ui/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png3.67KB1.93KB▼ 47.53%