78% subscribr

Code Review | Subscribr

WordPress plugin Subscribr scored78%from 54 tests.

About plugin

  • Plugin page: subscribr
  • Plugin version: 0.1.9.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.3
  • WordPress version: 6.3.1
  • First release: Sep 30, 2013
  • Latest release: Aug 10, 2015
  • Number of updates: 28
  • Update frequency: every 24.3 days
  • Top authors: mindshare (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

50+ active /5,771 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.67MB] [CPU: ▼0.05ms] Passed 4 tests

Server-side resources used by Subscribr
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.16 ▲0.7047.60 ▲7.39
Dashboard /wp-admin4.01 ▲0.7051.25 ▲0.98
Posts /wp-admin/edit.php4.06 ▲0.7054.76 ▲0.84
Add New Post /wp-admin/post-new.php6.53 ▲0.6499.39 ▼8.17
Media Library /wp-admin/upload.php3.88 ▲0.6545.02 ▲6.15
Subscribr /wp-admin/options-general.php?page=subscribr-settings3.8838.03

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 51 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
subscribr_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Subscribr
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.27 ▼0.151.75 ▼0.2244.13 ▼0.43
Dashboard /wp-admin2,202 ▲225.66 ▲0.0390.11 ▼3.8142.36 ▼1.86
Posts /wp-admin/edit.php2,101 ▲42.01 ▲0.0239.09 ▲1.3341.47 ▲7.81
Add New Post /wp-admin/post-new.php6,246 ▲4,69225.95 ▲7.60900.43 ▲244.1257.50 ▲8.27
Media Library /wp-admin/upload.php1,407 ▲44.20 ▼0.1295.61 ▼11.0943.85 ▼4.19
Subscribr /wp-admin/options-general.php?page=subscribr-settings1,7152.5055.7385.13

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • subscribr_options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/subscribr/subscribr.php:60
    • > PHP Warning
      require_once(mindshare-options-framework.php): failed to open stream: No such file or directory in wp-content/plugins/subscribr/lib/mindshare-options-framework/demo/class-usage-demo.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'subscribr_options_framework' not found in wp-content/plugins/subscribr/views/options-page.php:12
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/subscribr/views/email-profile-fields.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Subscribr' not found in wp-content/plugins/subscribr/controllers/options-init.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/subscribr/views/profile-fields.php:15
    • > PHP Fatal error
      require_once(): Failed opening required 'mindshare-options-framework.php' (include_path='.:/usr/share/php') in wp-content/plugins/subscribr/lib/mindshare-options-framework/demo/class-usage-demo.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'Subscribr' not found in wp-content/plugins/subscribr/views/meta-box.php:15

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=subscribr-settings
    • > Console-api (warning) in unknown
    /wp-includes/js/jquery/jquery.min.js?ver=3.7.0 1:28609 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'msie')" "TypeError: Cannot read properties of undefined (reading 'msie')\n at $.\u003Ccomputed>.disableTextSelection (/wp-content/plugins/subscribr/lib/mindshare-options-framework/lib/iphone-style-checkboxes/iphone-style-checkboxes.js:53:20)\n at new $.\u003Ccomputed> (/wp-content/plugins/subscribr/lib/mindshare-options-framework/lib/iphone-style-checkboxes/iphone-style-checkboxes.js:20:8)\n at HTMLInputElement.\u003Canonymous> (/wp-content/plugins/subscribr/lib/mindshare-options-framework/lib/iphone-style-checkboxes/iphone-style-checkboxes.js:168:31)\n at Function.each (/wp-includes/js/jquery/jquery.min.js?ver=3.7.0:2:3129)\n at e.\u003Ccomputed>.each (/wp-includes/js/jquery/jquery.min.js?ver=3.7.0:2:1594)\n at $.fn.\u003Ccomputed> [as iphoneStyle] (/wp-content/plugins/subscribr/lib/mindshare-options-framework/lib/iphone-style-checkboxes/iphone-style-checkboxes.js:167:14)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/subscribr/lib/mindshare-options-framework/js/mindshare-options-framework.js:166:25)\n at e (/wp-includes/js/jquery/jquery.min.js?ver=3.7.0:2:26990)\n at t (/wp-includes/js/jquery/jquery.min.js?ver=3.7.0:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=subscribr-settings
    • > Javascript (severe) in unknown
    /wp-includes/js/jquery/jquery.min.js?ver=3.7.0 1:28721 Uncaught TypeError: Cannot read properties of undefined (reading 'msie')

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: Screenshot #1 (The user profile options screenshot-2.png) image missing
You can take inspiration from this readme.txt

subscribr/subscribr.php Passed 13 tests

The main PHP script in "Subscribr" version 0.1.9.1 is automatically included on every request by WordPress
124 characters long description:
Allows WordPress users to subscribe to email notifications for new posts, pages, and custom types, filterable by taxonomies.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected12,004 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript108598957,718
PHP125112,0793,651
CSS53539629
Markdown2206

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity94.80
▷ Minimum class complexity7.00
▷ Maximum class complexity326.00
Average method complexity3.81
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods167
▷ Static methods63.59%
▷ Public methods16498.20%
▷ Protected methods00.00%
▷ Private methods31.80%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
14 compressed PNG files occupy 0.25MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/mindshare-options-framework/lib/iphone-style-checkboxes/images/slider_center.png0.25KB0.35KB0.00%
lib/chosen/chosen-sprite.png0.63KB0.88KB0.00%
lib/chosen/chosen-sprite@2x.png0.85KB0.83KB▼ 3.10%
lib/mindshare-options-framework/img/edit.png0.70KB0.72KB0.00%
lib/mindshare-options-framework/lib/iphone-style-checkboxes/images/slider_right.png0.31KB0.41KB0.00%