84% simple-registration-form

Code Review | Simple Registration Form

WordPress plugin Simple Registration Form scored84%from 54 tests.

About plugin

  • Plugin page: simple-registrati...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Aug 22, 2015
  • Latest release: Jul 25, 2022
  • Number of updates: 21
  • Update frequency: every 120.4 days
  • Top authors: amu02aftab (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

200+ active /15,584 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.43ms] Passed 4 tests

Server-side resources used by Simple Registration Form
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.51 ▼3.15
Dashboard /wp-admin3.37 ▲0.0742.81 ▼8.24
Posts /wp-admin/edit.php3.40 ▲0.0546.46 ▲0.83
Add New Post /wp-admin/post-new.php6.04 ▲0.1675.48 ▼10.52
Media Library /wp-admin/upload.php3.31 ▲0.0832.86 ▼3.80

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Registration Form
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.22 ▼1.422.18 ▲0.4444.64 ▼1.17
Dashboard /wp-admin2,209 ▲384.85 ▼1.18100.69 ▼19.4438.37 ▼8.47
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.1339.62 ▲2.3634.76 ▼0.55
Add New Post /wp-admin/post-new.php1,514 ▼017.58 ▲0.04640.00 ▼44.0649.90 ▼15.66
Media Library /wp-admin/upload.php1,382 ▼34.23 ▼0.0294.73 ▼6.0142.13 ▼3.40

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/simple-registration-form/simple-registration-form.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% 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
Attributes that require attention:
  • Screenshots: Screenshot #1 (Front end registration form) image not found
The official readme.txt is a good inspiration

simple-registration-form/simple-registration-form.php Passed 13 tests

The primary PHP file in "Simple Registration Form" version 1.0.1 is used by WordPress to initiate all plugin functionality
99 characters long description:
This plugin allows users to put simple registration form on page , post or template using shortcode

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin131 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1131577
CSS124542
JavaScript10112

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png7.44KB4.04KB▼ 45.74%