84% simple-membership-form-shortcode

Code Review | Simple Membership Form Shortcode

WordPress plugin Simple Membership Form Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: simple-membership...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Oct 18, 2014
  • Latest release: Mar 23, 2023
  • Number of updates: 13
  • Update frequency: every 236.9 days
  • Top authors: wp.insider (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

3,000+ active /32,449 total downloads

Benchmarks

Plugin footprint 83% 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.01MB] [CPU: ▼4.70ms] Passed 4 tests

Analyzing server-side resources used by Simple Membership Form Shortcode
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.14 ▼3.96
Dashboard /wp-admin3.31 ▼0.0345.87 ▼15.98
Posts /wp-admin/edit.php3.36 ▲0.0045.69 ▲2.01
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.54 ▼0.70
Media Library /wp-admin/upload.php3.24 ▲0.0033.76 ▲1.83

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Simple Membership Form Shortcode: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.27 ▼1.545.28 ▲3.0840.68 ▼1.84
Dashboard /wp-admin2,200 ▲95.84 ▲0.8799.88 ▼5.7240.38 ▼1.55
Posts /wp-admin/edit.php2,092 ▲62.04 ▼0.0238.94 ▲1.8837.28 ▼1.07
Add New Post /wp-admin/post-new.php1,533 ▲1422.94 ▼0.15619.80 ▼1.0550.66 ▲4.32
Media Library /wp-admin/upload.php1,382 ▼94.19 ▼0.0394.78 ▼8.3341.76 ▼1.92

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • 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
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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/simple-membership-form-shortcode/swpm-form-shortcode.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'SwpmUtils' not found in wp-content/plugins/simple-membership-form-shortcode/views/shortcode_generator.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: registration, members, form, membership, member...

simple-membership-form-shortcode/swpm-form-shortcode.php 92% from 13 tests

"Simple Membership Form Shortcode" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("simple-membership-form-shortcode.php" instead of "swpm-form-shortcode.php")

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
No dangerous file extensions were detected41 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP28841

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin