84% jetpack-subscription-form

Code Review | Jetpack Subscription Form

WordPress plugin Jetpack Subscription Form scored84%from 54 tests.

About plugin

  • Plugin page: jetpack-subscript...
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.2-4.6
  • WordPress version: 6.3.1
  • First release: Aug 20, 2014
  • Latest release: Aug 29, 2016
  • Number of updates: 7
  • Update frequency: every 105.9 days
  • Top authors: kiranantony (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /11,997 total downloads

Benchmarks

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

Analyzing server-side resources used by Jetpack Subscription Form
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.25 ▼2.33
Dashboard /wp-admin3.39 ▲0.0443.59 ▼15.38
Posts /wp-admin/edit.php3.44 ▲0.0845.65 ▼6.48
Add New Post /wp-admin/post-new.php5.97 ▲0.0887.00 ▼13.90
Media Library /wp-admin/upload.php3.31 ▲0.0834.36 ▼3.07

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_blog_subscription_custom_jetpack
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Jetpack Subscription Form: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.09 ▼0.491.95 ▲0.3046.05 ▲5.38
Dashboard /wp-admin2,195 ▲155.51 ▼0.1582.13 ▼4.9137.06 ▼8.67
Posts /wp-admin/edit.php2,103 ▲31.97 ▼0.1134.80 ▼6.5631.70 ▼6.42
Add New Post /wp-admin/post-new.php1,526 ▼122.99 ▼0.11658.47 ▼25.9153.51 ▼1.05
Media Library /wp-admin/upload.php1,397 ▼34.16 ▼0.0296.77 ▼3.8642.32 ▼0.10

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
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_blog_subscription_custom_jetpack
    • db_upgraded
    • widget_theysaidso_widget

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at 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/jetpack-subscription-form/jetpack-subscription.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Jetpack Subscription Custom Widget)
The official readme.txt might help

jetpack-subscription-form/jetpack-subscription.php 92% from 13 tests

This is the main PHP file of "Jetpack Subscription Form" version 1.1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("jetpack-subscription-form.php" instead of "jetpack-subscription.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 detected324 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14845324

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity46.00
▷ Minimum class complexity46.00
▷ Maximum class complexity46.00
Average method complexity7.43
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png28.88KB14.14KB▼ 51.02%