10% sc-popup-subscriber-form

Code Review | SC Popup Subscriber Form

WordPress plugin SC Popup Subscriber Form scored10%from 54 tests.

About plugin

  • Plugin page: sc-popup-subscrib...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9.1
  • WordPress version: 6.3.1
  • First release: Jun 21, 2013
  • Latest release: Jul 6, 2014
  • Number of updates: 4
  • Update frequency: every 95.3 days
  • Top authors: sharpcoders (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /6,782 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/sc-popup-subscriber-form/sc-popup-subscriber-form.php+18
    Use of undefined constant SCPopupSubscriber - assumed 'SCPopupSubscriber' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.96MB] [CPU: ▼58.82ms] Passed 4 tests

Server-side resources used by SC Popup Subscriber Form
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.66 ▼47.71
Dashboard /wp-admin2.05 ▼1.265.90 ▼42.71
Posts /wp-admin/edit.php2.05 ▼1.315.98 ▼42.78
Add New Post /wp-admin/post-new.php2.05 ▼3.845.78 ▼102.07
Media Library /wp-admin/upload.php2.05 ▼1.184.69 ▼29.14

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
sc_popup_subscriber_form_options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for SC Popup Subscriber Form
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,001 ▲25513.89 ▼0.5010.66 ▲8.7651.05 ▲10.18
Dashboard /wp-admin2,213 ▲254.88 ▼0.03100.79 ▼4.7945.82 ▲1.66
Posts /wp-admin/edit.php2,093 ▲42.06 ▼0.0036.97 ▼5.2633.59 ▼3.00
Add New Post /wp-admin/post-new.php1,517 ▲317.61 ▼0.01707.38 ▲58.0057.15 ▲0.38
Media Library /wp-admin/upload.php1,395 ▲44.27 ▲0.0597.87 ▼0.3243.07 ▲1.07
SC Popup Subscriber /wp-admin/sc-popup-subscriber-form.php260.440.0614.08

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/sc-popup-subscriber-form/sc-popup-subscriber-form.php+18
    Use of undefined constant SCPopupSubscriber - assumed 'SCPopupSubscriber' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • sc_popup_subscriber_form_options
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/sc-popup-subscriber-form.php
    • > Network (severe)
    wp-admin/sc-popup-subscriber-form.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Admin Panel Setting), #2 (SC Popup Subscriber Form)
The official readme.txt is a good inspiration

sc-popup-subscriber-form/sc-popup-subscriber-form.php Passed 13 tests

The entry point to "SC Popup Subscriber Form" version 1.2 is a PHP file that has certain tags in its header comment area
35 characters long description:
Popup Subscriber form of Feedburner

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin389 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22013333
CSS15356

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
6 PNG files occupy 0.17MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png100.82KB32.86KB▼ 67.40%
images/envelope.png18.64KB9.28KB▼ 50.24%
screenshot-1.png40.68KB14.36KB▼ 64.71%
images/close-buttons-sprite.png7.98KB4.05KB▼ 49.22%
images/input-bg.png1.43KB0.41KB▼ 71.40%