78% websand-subscription-form

Code Review | Websand Subscription Form

WordPress plugin Websand Subscription Form scored78%from 54 tests.

About plugin

  • Plugin page: websand-subscript...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.7
  • WordPress version: 6.3.1
  • First release: Jan 13, 2017
  • Latest release: Jan 26, 2018
  • Number of updates: 8
  • Update frequency: every 46.9 days
  • Top authors: websand (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /776 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.05MB] [CPU: ▼6.21ms] Passed 4 tests

This is a short check of server-side resources used by Websand Subscription Form
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.29 ▼4.88
Dashboard /wp-admin3.36 ▲0.0651.64 ▼8.76
Posts /wp-admin/edit.php3.47 ▲0.1252.13 ▼1.68
Add New Post /wp-admin/post-new.php5.94 ▲0.0585.14 ▼9.53
Media Library /wp-admin/upload.php3.28 ▲0.0537.10 ▲0.36
Websand for WordPress /wp-admin/options-general.php?page=plugin3.2231.38

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_websand_subscription_form
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Websand Subscription Form
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,874 ▲11313.39 ▼1.027.85 ▲5.2741.69 ▼3.37
Dashboard /wp-admin2,202 ▲225.59 ▼0.2194.81 ▲0.9341.91 ▼0.96
Posts /wp-admin/edit.php2,104 ▲41.95 ▼0.0339.67 ▲4.2535.48 ▲1.10
Add New Post /wp-admin/post-new.php1,539 ▲1418.40 ▼4.72649.38 ▼12.9267.47 ▲5.40
Media Library /wp-admin/upload.php1,401 ▲14.22 ▲0.0198.95 ▼10.7044.83 ▲0.34
Websand for WordPress /wp-admin/options-general.php?page=plugin8602.0022.2526.88

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
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_websand_subscription_form
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=plugin
    • > Notice in wp-content/plugins/websand-subscription-form/websand_subscription_form.php+238
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/websand-subscription-form/websand_subscription_form.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed: The official readme.txt might help

websand-subscription-form/websand_subscription_form.php 92% from 13 tests

Analyzing the main PHP file in "Websand Subscription Form" version 1.0.3
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("websand-subscription-form.php" instead of "websand_subscription_form.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected296 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13826207
Markdown116054
JavaScript12035

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions1392.86%
▷ Anonymous functions17.14%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected