62% wp-subscriber-form

Code Review | WP Subscriber Form

WordPress plugin WP Subscriber Form scored62%from 54 tests.

About plugin

  • Plugin page: wp-subscriber-form
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4.2
  • WordPress version: 6.3.1
  • First release: Nov 26, 2012
  • Latest release: Nov 30, 2012
  • Number of updates: 7
  • Update frequency: every 0.7 days
  • Top authors: sharpcoders (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

70+ active /21,489 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.93MB] [CPU: ▼37.72ms] Passed 4 tests

A check of server-side resources used by WP Subscriber Form
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.43 ▼1.90
Dashboard /wp-admin3.01 ▼0.2929.20 ▼23.65
Posts /wp-admin/edit.php3.01 ▼0.3424.59 ▼26.47
Add New Post /wp-admin/post-new.php3.01 ▼2.8823.61 ▼84.59
Media Library /wp-admin/upload.php3.01 ▼0.2222.48 ▼16.15

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
sc_subscriber_form_btncss
sc_subscriber_form
theysaidso_admin_options
sc_subscriber_form_heading
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WP Subscriber Form
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲3714.35 ▼0.051.95 ▼1.0640.88 ▼3.37
Dashboard /wp-admin2,203 ▲265.63 ▲0.0184.39 ▼11.7338.73 ▼2.40
Posts /wp-admin/edit.php2,108 ▲81.96 ▼0.0740.30 ▲0.9336.92 ▼0.52
Add New Post /wp-admin/post-new.php1,533 ▲723.89 ▲0.81686.01 ▼0.3851.97 ▼0.12
Media Library /wp-admin/upload.php1,402 ▲54.18 ▲0.02103.34 ▲1.8343.41 ▼2.94
WP Subsriber Form /wp-admin/subscriber-form.php260.420.0914.28

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
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options were found after uninstall: 9 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • sc_subscriber_form_heading
    • sc_subscriber_form_btncss
    • db_upgraded
    • theysaidso_admin_options
    • sc_subscriber_form

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-subscriber-form/subscriber-form.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/wp-subscriber-form/wp-subscriber-options.php:12
    • > PHP Notice
      Undefined variable: action_url in wp-content/plugins/wp-subscriber-form/wp-subscriber-options.php on line 10

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/subscriber-form.php
    • > Network (severe)
    wp-admin/subscriber-form.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% 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:
  • Screenshots: These screenshots require images: #1 (Admin Panel Setting), #2 (WP Subscriber Form)
The official readme.txt might help

wp-subscriber-form/subscriber-form.php 92% from 13 tests

The principal PHP file in "WP Subscriber Form" v. 1.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-subscriber-form.php" instead of "subscriber-form.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin216 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP21212135
CSS10081

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
5 PNG files occupy 0.14MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/user_icon.png0.64KB0.57KB▼ 11.33%
screenshot-2.png19.26KB7.14KB▼ 62.94%
images/email_big_icon.png9.40KB3.52KB▼ 62.59%
screenshot-1.png114.06KB36.77KB▼ 67.76%
images/email_icon.png0.51KB0.59KB0.00%