83% email-subscription-form-widget

Code Review | Email Subscription Form Widget

WordPress plugin Email Subscription Form Widget scored83%from 54 tests.

About plugin

  • Plugin page: email-subscriptio...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-5.7.2
  • WordPress version: 6.3.1
  • First release: Jun 17, 2021
  • Latest release: Jun 17, 2021
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: devshakhawat (100%)Otto42 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /308 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.47ms] Passed 4 tests

Analyzing server-side resources used by Email Subscription Form Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.28 ▼4.83
Dashboard /wp-admin3.33 ▲0.0345.57 ▼0.08
Posts /wp-admin/edit.php3.38 ▲0.0247.72 ▲2.56
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.98 ▼3.94
Media Library /wp-admin/upload.php3.25 ▲0.0232.81 ▼1.02

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, 7 new options
New WordPress options
widget_mailchimpwidget
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Email Subscription Form Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲17413.69 ▼0.614.95 ▲3.3336.57 ▼4.35
Dashboard /wp-admin2,209 ▲235.88 ▼0.0399.65 ▼8.2839.45 ▲3.06
Posts /wp-admin/edit.php2,089 ▼02.14 ▲0.1339.26 ▲3.5934.41 ▼0.41
Add New Post /wp-admin/post-new.php1,537 ▲2323.23 ▼0.15680.08 ▲6.4855.77 ▲2.78
Media Library /wp-admin/upload.php1,391 ▲34.19 ▼0.00100.94 ▲4.8543.69 ▲0.85

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_mailchimpwidget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/email-subscription-form-widget/includes/Mailchimp_Subs.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: mailchimp subscription form, simple mailchimp form, simple subscription form, email subscription mailchimp, mailchimp

email-subscription-form-widget/skt_subscription_widget.php 77% from 13 tests

Analyzing the main PHP file in "Email Subscription Form Widget" version 1.0.0
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("email-subscription-form-widget.php" instead of "skt_subscription_widget.php")
  • Domain Path: The domain path folder does not exist ("/languages")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected810 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP14267309771
JavaScript18021
JSON20018

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity11.44
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.74
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes111.11%
Methods55
▷ Static methods1629.09%
▷ Public methods5294.55%
▷ Protected methods00.00%
▷ Private methods35.45%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants6
▷ Global constants583.33%
▷ Class constants116.67%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin