84% nifty-newsletters-woocommerce-subscriptions

Code Review | Nifty Newsletters - WooCommerce Subscriptions

WordPress plugin Nifty Newsletters - WooCommerce Subscriptions scored84%from 54 tests.

About plugin

  • Plugin page: nifty-newsletters...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.4.0-5.3
  • WordPress version: 6.3.1
  • First release: Oct 21, 2015
  • Latest release: Dec 4, 2019
  • Number of updates: 5
  • Update frequency: every 301.0 days
  • Top authors: SolaPlugins (80%)abelc (40%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,737 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.49ms] Passed 4 tests

A check of server-side resources used by Nifty Newsletters - WooCommerce Subscriptions
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0343.60 ▼0.06
Dashboard /wp-admin3.34 ▲0.0452.99 ▼0.81
Posts /wp-admin/edit.php3.39 ▲0.0349.77 ▼3.02
Add New Post /wp-admin/post-new.php5.92 ▲0.0398.00 ▼10.08
Media Library /wp-admin/upload.php3.26 ▲0.0342.73 ▲4.46

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 10 new options
New WordPress options
sola_nl_w_default_list
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
sola_nl_w_enable_subscription
sola_nl_w_checkout_label
can_compress_scripts
widget_recent-posts
sola_nl_w_first_run

Browser metrics Passed 4 tests

Nifty Newsletters - WooCommerce Subscriptions: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲4714.25 ▼0.131.55 ▼0.6042.47 ▼5.37
Dashboard /wp-admin2,214 ▲345.59 ▼0.0698.15 ▲2.3044.20 ▲2.52
Posts /wp-admin/edit.php2,119 ▲192.11 ▲0.1340.36 ▲2.5136.74 ▲0.64
Add New Post /wp-admin/post-new.php1,615 ▲8821.65 ▼1.69650.35 ▼36.9840.09 ▼13.56
Media Library /wp-admin/upload.php1,422 ▲254.23 ▲0.02108.29 ▲0.3745.67 ▲2.52

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 10 options
    • theysaidso_admin_options
    • sola_nl_w_enable_subscription
    • widget_theysaidso_widget
    • sola_nl_w_checkout_label
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • sola_nl_w_first_run
    • sola_nl_w_default_list

Smoke tests 75% 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 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: Call to undefined function register_activation_hook() in wp-content/plugins/nifty-newsletters-woocommerce-subscriptions/nifty-newsletters-woocommerce-subscriptions.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% 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
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Nifty Newletters WooCommerce Integration Settings), #2 (The checkbox added to the checkout page)
The official readme.txt is a good inspiration

nifty-newsletters-woocommerce-subscriptions/nifty-newsletters-woocommerce-subscriptions.php 92% from 13 tests

This is the main PHP file of "Nifty Newsletters - WooCommerce Subscriptions" version 1.0.2, 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:
  • Requires at least: Required version does not match the one declared in readme.txt ("3.8" instead of "2.4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected212 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP110928162
PO File1101050

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
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
No PNG files were detected