10% content4subscribers

Code Review | Content4Subscribers

WordPress plugin Content4Subscribers scored 10% from 54 tests.

About plugin

  • Plugin page: content4subscribers
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.6.1
  • WordPress version: 5.8.1
  • First release: Oct 4, 2013
  • Latest release: Nov 20, 2013
  • Number of updates: 7
  • Update frequency: every 6.7 days
  • Top authors: websupporter (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,050 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/content4subscribers/content4subscribers.php+11
    Constant WP_DEBUG already defined

Server metrics [RAM: ▼1.74MB] [CPU: ▼214.47ms] Passed 4 tests

Analyzing server-side resources used by Content4Subscribers
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.89 ▼0.839.58 ▼10.91
Dashboard /wp-admin1.91 ▼1.146.32 ▼35.67
Posts /wp-admin/edit.php1.91 ▼1.195.97 ▼35.24
Add New Post /wp-admin/post-new.php1.91 ▼3.525.37 ▼755.89
Media Library /wp-admin/upload.php1.91 ▼1.106.54 ▼31.06
Content 4 Subscribers Settings /wp-admin/options-general.php?page=c4s1.915.91

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 93 new files
Database: no new tables, 3 new options
New WordPress options
c4s
widget_login-widget
widget_signup-widget

Browser metrics Passed 4 tests

Content4Subscribers: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,820 ▲21416.48 ▲0.6110.69 ▲3.0348.63 ▼0.56
Dashboard /wp-admin2,979 ▲455.89 ▼0.06136.97 ▼10.17117.74 ▲13.67
Posts /wp-admin/edit.php2,748 ▲92.69 ▼0.0166.77 ▲0.0195.00 ▲10.78
Add New Post /wp-admin/post-new.php1,613 ▲11518.64 ▼0.36363.31 ▲1.13111.12 ▲2.03
Media Library /wp-admin/upload.php1,816 ▲94.98 ▼0.02165.67 ▲7.52112.41 ▼13.61
Content 4 Subscribers Settings /wp-admin/options-general.php?page=c4s1,2772.2552.9569.74

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/content4subscribers/content4subscribers.php+11
    Constant WP_DEBUG already defined
  • Zombie WordPress options were found after uninstall: 3 options
    • widget_login-widget
    • c4s
    • widget_signup-widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=c4s
    • > Notice in wp-content/plugins/content4subscribers/content4subscribers.php+11
    Constant WP_DEBUG already defined
    • > GET request to /wp-admin/options-general.php?page=c4s
    • > Deprecated in wp-content/plugins/content4subscribers/includes/widgets/login.php+26
    Methods with the same name as their class will not be constructors in a future version of PHP; Login_Widget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=c4s
    • > Deprecated in wp-content/plugins/content4subscribers/includes/widgets/signup.php+26
    Methods with the same name as their class will not be constructors in a future version of PHP; Signup_Widget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=c4s
    • > User deprecated in wp-includes/functions.php+5304
    The called constructor method for WP_Widget in Login_Widget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=c4s
    • > User deprecated in wp-includes/functions.php+5304
    The called constructor method for WP_Widget in Signup_Widget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=c4s
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=c4s
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=c4s
    • > Notice in wp-content/plugins/content4subscribers/includes/admin.php+41
    Undefined index: cr_apikey
    • > GET request to /wp-admin/options-general.php?page=c4s
    • > Notice in wp-content/plugins/content4subscribers/includes/admin.php+62
    Undefined index: mc_apikey

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/content4subscribers/templates/widget_login_confirm.php
  • 69× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      require_once(aweber_api/aweber_api.php): failed to open stream: No such file or directory in wp-content/plugins/content4subscribers/includes/classes/aweber/tests/AWeberCollectionFindTest.php on line 2
    • > PHP Notice
      Undefined variable: attr in wp-content/plugins/content4subscribers/templates/signup.php on line 19
    • > PHP Warning
      require_once(aweber_api/aweber_api.php): failed to open stream: No such file or directory in wp-content/plugins/content4subscribers/includes/classes/aweber/tests/AWeberCollectionTest.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/content4subscribers/templates/signup.php:24
    • > PHP Notice
      Undefined variable: attr in wp-content/plugins/content4subscribers/templates/widget_signup.php on line 19
    • > PHP Fatal error
      Uncaught Error: Class 'OAuthApplication' not found in wp-content/plugins/content4subscribers/includes/classes/aweber/tests/mock_adapter.php:54
    • > PHP Warning
      require_once(aweber_api/aweber_api.php): failed to open stream: No such file or directory in wp-content/plugins/content4subscribers/includes/classes/aweber/tests/AWeberCreateEntryTest.php on line 2
    • > PHP Notice
      Undefined variable: attr in wp-content/plugins/content4subscribers/templates/widget_signup.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/content4subscribers/templates/widget_login.php:22
    • > PHP Fatal error
      require_once(): Failed opening required 'aweber_api/aweber_api.php' (include_path='.:/usr/share/php') in wp-content/plugins/content4subscribers/includes/classes/aweber/tests/AWeberCreateEntryTest.php on line 2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: email, email marketing, mailchimp, cleverreach, marketing

content4subscribers/content4subscribers.php Passed 13 tests

The primary PHP file in "Content4Subscribers" version 1.1 is used by WordPress to initiate all plugin functionality
83 characters long description:
Encourage readers to subscribe to your newsletter in order to see your blog-content

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin3,086 lines of code in 72 files:
LanguageFilesBlank linesComment linesLines of code
PHP365911,1842,599
Ant1180131
Markdown1500116
PO File1325899
CSS213370
XML35435
JSON270027
YAML1309

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity3.93
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity1.58
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces2
Traits0
Classes42
▷ Abstract classes12.38%
▷ Concrete classes4197.62%
▷ Final classes00.00%
Methods232
▷ Static methods31.29%
▷ Public methods21190.95%
▷ Protected methods198.19%
▷ Private methods20.86%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
14 PNG files occupy 0.12MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/mailchimp3.png7.93KB3.94KB▼ 50.28%
img/mailchimp7.png19.20KB9.02KB▼ 53.03%
img/mailchimp2.png7.84KB3.87KB▼ 50.63%
img/mailchimp6.png7.11KB4.23KB▼ 40.45%
img/unlock.png7.42KB3.42KB▼ 53.99%