78% subscriber

Code Review | Subscriber by BestWebSoft

WordPress plugin Subscriber by BestWebSoft scored78%from 54 tests.

About plugin

  • Plugin page: subscriber
  • Plugin version: 1.4.8
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Mar 13, 2014
  • Latest release: Aug 10, 2023
  • Number of updates: 61
  • Update frequency: every 56.4 days
  • Top authors: bestwebsoft (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

2,000+ active /112,579 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲1.11MB] [CPU: ▲1.78ms] Passed 4 tests

Server-side resources used by Subscriber by BestWebSoft
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.60 ▲1.1555.15 ▲11.05
Dashboard /wp-admin4.44 ▲1.1455.29 ▲5.98
Posts /wp-admin/edit.php4.49 ▲1.1452.87 ▲1.96
Add New Post /wp-admin/post-new.php6.98 ▲1.1089.50 ▼11.87
Media Library /wp-admin/upload.php4.30 ▲1.0746.29 ▲11.69

Server storage [IO: ▲5.53MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 130 new files
Database: 1 new table, 9 new options
New tables
wp_sndr_mail_users_info
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_sbscrbr_widget
bstwbsftwppdtplgns_options
sbscrbr_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Subscriber by BestWebSoft
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲14013.70 ▼0.604.51 ▲2.2443.06 ▼3.59
Dashboard /wp-admin2,298 ▲1105.89 ▲1.0497.15 ▼18.7940.48 ▼6.41
Posts /wp-admin/edit.php2,194 ▲1022.23 ▲0.2433.40 ▼7.1632.83 ▼6.50
Add New Post /wp-admin/post-new.php1,618 ▲7618.65 ▲0.23602.49 ▼1.2962.06 ▲12.71
Media Library /wp-admin/upload.php1,483 ▲984.23 ▲0.0295.55 ▼3.3341.56 ▼2.55
BWS Panel /wp-admin/subscriber.php?page=sbscrbr-bws-panel260.440.0915.14
Settings /wp-admin/subscriber.php260.440.415.51
Subscribers /wp-admin/subscriber-users.php260.440.256.90

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_sbscrbr_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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
Almost there! Just fix the following items
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/subscriber/bws_menu/class-bws-settings.php:1329
    • > PHP Fatal error
      Uncaught Error: Class 'Bws_Settings_Tabs' not found in wp-content/plugins/subscriber/includes/class-sbscrbr-settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/subscriber/bws_menu/product_list.php:8
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/subscriber/includes/users.php on line 13
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/subscriber/includes/users.php on line 13
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/subscriber/includes/users.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/subscriber/subscriber.php:681

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/subscriber.php?page=sbscrbr-bws-panel
    • > Network (severe)
    wp-admin/subscriber.php?page=sbscrbr-bws-panel - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/subscriber.php
    • > Network (severe)
    wp-admin/subscriber.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/subscriber-users.php
    • > Network (severe)
    wp-admin/subscriber-users.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
  • Screenshots: Please add images for these screenshots: #1 (Subscriber Sign Up Form widget in the frontend.), #2 (Subscriber Basic Settings page.), #3 (Subscriber Email Notifications page.), #4 (Subscriber Subscribers page.), #5 (Subscriber Sign Up Form widget settings.)
The official readme.txt is a good inspiration

subscriber/subscriber.php Passed 13 tests

"Subscriber by BestWebSoft" version 1.4.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
111 characters long description:
Add email newsletter sign up form to WordPress posts, pages and widgets. Collect data and subscribe your users.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected22,883 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PO File124,2946,3379,648
PHP116707206,864
CSS111932915,764
JavaScript831117457
SVG400150

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity88.17
▷ Minimum class complexity21.00
▷ Maximum class complexity225.00
Average method complexity11.06
▷ Minimum method complexity1.00
▷ Maximum method complexity76.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods52
▷ Static methods00.00%
▷ Public methods4382.69%
▷ Protected methods00.00%
▷ Private methods917.31%
Functions92
▷ Named functions92100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
65 PNG files occupy 3.62MB with 1.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
bws_menu/css/jquery-ui-styles/1.9.2/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
bws_menu/css/jquery-ui-styles/1.11.4/images/ui-bg_glass_95_fef1ec_1x400.png0.32KB0.15KB▼ 54.82%
bws_menu/css/jquery-ui-styles/1.11.4/images/ui-icons_888888_256x240.png6.83KB4.17KB▼ 38.92%
bws_menu/css/jquery-ui-styles/1.9.2/images/ui-icons_888888_256x240.png4.27KB4.11KB▼ 3.78%
bws_menu/css/jquery-ui-styles/1.11.4/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%