10% ultimate-subscribe

Code Review | Ultimate Subscribe

WordPress plugin Ultimate Subscribe scored10%from 54 tests.

About plugin

  • Plugin page: ultimate-subscribe
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Dec 29, 2016
  • Latest release: Oct 6, 2018
  • Number of updates: 11
  • Update frequency: every 58.4 days
  • Top authors: ThemeFarmer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /6,211 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure had errors
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▲0.06MB] [CPU: ▼1.91ms] Passed 4 tests

An overview of server-side resources used by Ultimate Subscribe
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.26 ▼2.77
Dashboard /wp-admin3.36 ▲0.0650.29 ▼3.39
Posts /wp-admin/edit.php3.47 ▲0.1252.78 ▲1.05
Add New Post /wp-admin/post-new.php5.97 ▲0.0893.02 ▼0.53
Media Library /wp-admin/upload.php3.28 ▲0.0536.14 ▼0.95
Dashboard /wp-admin/admin.php?page=ultimate-subscribe3.2845.31
Subscribers /wp-admin/admin.php?page=ultimate-subscribe-users3.3039.48
Forms /wp-admin/edit.php?post_type=u_subscribe_forms3.3738.68
Settings /wp-admin/admin.php?page=ultimate-subscribe-settings3.3535.00

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 54 new files
Database: 2 new tables, 8 new options
New tables
wp_ultimate_subscribe_lists
wp_ultimate_subscribe
New WordPress options
widget_recent-posts
widget_ultimate_subscribe_form_widget
db_upgraded
widget_recent-comments
ultimate_subscribe_options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Ultimate Subscribe
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,940 ▲19413.96 ▼0.668.66 ▲6.3338.10 ▼6.42
Dashboard /wp-admin2,250 ▲625.21 ▼0.65102.51 ▼15.0639.56 ▼4.28
Posts /wp-admin/edit.php2,127 ▲352.55 ▲0.5342.78 ▲2.5335.11 ▼2.60
Add New Post /wp-admin/post-new.php1,552 ▲1923.12 ▼0.22683.58 ▼39.4053.62 ▼0.52
Media Library /wp-admin/upload.php1,429 ▲414.54 ▲0.29109.18 ▼1.8746.97 ▲0.57
Dashboard /wp-admin/admin.php?page=ultimate-subscribe8642.0037.3643.20
Subscribers /wp-admin/admin.php?page=ultimate-subscribe-users9532.0729.3526.98
Forms /wp-admin/edit.php?post_type=u_subscribe_forms1,6362.3138.7928.78
Settings /wp-admin/admin.php?page=ultimate-subscribe-settings1,6162.0327.1232.63

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_ultimate_subscribe_lists
    • wp_ultimate_subscribe
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_ultimate_subscribe_form_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

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
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ultimate-subscribe/forms/form-1.php
  • 14× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/ultimate-subscribe/admin/manu-pages/dashboard.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ultimate-subscribe/admin/settings/settings-init.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ultimate-subscribe/admin/settings/sections/form-options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ultimate-subscribe/admin/settings/sections/mail-options.php:2
    • > PHP Warning
      require_once(ULTIMATE_SUBSCRIBE_DIRinc/api/MailChimp/MailChimp.php): failed to open stream: No such file or directory in wp-content/plugins/ultimate-subscribe/inc/register-subscriber.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ultimate-subscribe/admin/settings/sections/social-options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ultimate-subscribe/admin/settings/sections/popup-options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/ultimate-subscribe/admin/manu-pages/subscribers.php:14
    • > PHP Warning
      Use of undefined constant ULTIMATE_SUBSCRIBE_DIR - assumed 'ULTIMATE_SUBSCRIBE_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/ultimate-subscribe/inc/register-subscriber.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ultimate-subscribe/admin/inc/subscribe-form-widget.php:5

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 93% from 29 tests

readme.txt 94% 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: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

ultimate-subscribe/plugin.php 92% from 13 tests

"Ultimate Subscribe" version 1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ultimate-subscribe.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected13,312 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
CSS9715916,041
PHP255081,1702,783
SVG1002,671
JavaScript63304351,817

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity17.67
▷ Minimum class complexity1.00
▷ Maximum class complexity125.00
Average method complexity2.89
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods107
▷ Static methods1211.21%
▷ Public methods7872.90%
▷ Protected methods2119.63%
▷ Private methods87.48%
Functions36
▷ Named functions36100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
2 PNG files occupy 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/form-template-2.png27.27KB8.70KB▼ 68.10%
admin/assets/images/form-template-1.png27.64KB9.02KB▼ 67.36%