10% user-subscription

Code Review | User Subscription

WordPress plugin User Subscription scored10%from 54 tests.

About plugin

  • Plugin page: user-subscription
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.7.4
  • WordPress version: 6.3.1
  • First release: May 8, 2017
  • Latest release: May 8, 2017
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: pratik028 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /782 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/user-subscription/user-subscription.php+399
    The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence

Server metrics [RAM: ▼1.81MB] [CPU: ▼54.79ms] Passed 4 tests

This is a short check of server-side resources used by User Subscription
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.294.51 ▼37.06
Dashboard /wp-admin2.19 ▼1.116.45 ▼46.34
Posts /wp-admin/edit.php2.20 ▼1.168.01 ▼43.22
Add New Post /wp-admin/post-new.php2.19 ▼3.696.37 ▼92.54
Media Library /wp-admin/upload.php2.19 ▼1.035.97 ▼32.01
Subscription Settings /wp-admin/admin.php?page=user-subscription-settings2.196.90
Subscription Log /wp-admin/admin.php?page=user-subscription-log2.197.67

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for User Subscription
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲19213.90 ▼0.768.66 ▲6.7740.29 ▼2.73
Dashboard /wp-admin2,233 ▲424.82 ▼0.07106.34 ▼13.7339.26 ▼8.96
Posts /wp-admin/edit.php2,116 ▲272.05 ▲0.0637.69 ▲2.9937.06 ▼1.16
Add New Post /wp-admin/post-new.php1,564 ▲4418.37 ▼4.73627.24 ▼37.0552.50 ▲3.57
Media Library /wp-admin/upload.php1,415 ▲334.21 ▼0.0396.97 ▼13.4740.25 ▼5.98
Subscription Settings /wp-admin/admin.php?page=user-subscription-settings2,3708.51171.1337.57
Subscription Log /wp-admin/admin.php?page=user-subscription-log9791.8325.1726.70

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/user-subscription/user-subscription.php+399
    The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=user-subscription-log
    • > Deprecated in wp-content/plugins/user-subscription/user-subscription.php+399
    The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence

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 fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/user-subscription/admin/user-subscription-settings.php:6
    • > 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/user-subscription/admin/user-subscription-details.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/user-subscription/admin/user-subscription-details.php on line 3
    • > 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/user-subscription/admin/user-subscription-details.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: subscribe to category, subscribe to post, subscribe

user-subscription/user-subscription.php 92% from 13 tests

The main PHP file in "User Subscription" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,310 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP312721979
CSS2450296
JavaScript29335

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity31.50
▷ Minimum class complexity18.00
▷ Maximum class complexity45.00
Average method complexity4.59
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin