10% tt-subscribe

Code Review | TT - Subscribe

WordPress plugin TT - Subscribe scored10%from 54 tests.

About plugin

  • Plugin page: tt-subscribe
  • Plugin version: 4.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.9.7
  • WordPress version: 6.3.1
  • First release: Apr 17, 2013
  • Latest release: Jul 10, 2018
  • Number of updates: 143
  • Update frequency: every 13.6 days
  • Top authors: thesabeltuto (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,375 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/tt-subscribe/framework/widget/settings.php+4
    Function create_function() is deprecated

Server metrics [RAM: ▼1.94MB] [CPU: ▼56.87ms] Passed 4 tests

Server-side resources used by TT - Subscribe
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.414.83 ▼33.82
Dashboard /wp-admin2.07 ▼1.277.44 ▼55.53
Posts /wp-admin/edit.php2.08 ▼1.285.80 ▼43.64
Add New Post /wp-admin/post-new.php2.07 ▼3.816.50 ▼94.50
Media Library /wp-admin/upload.php2.08 ▼1.156.85 ▼29.26
Support /wp-admin/admin.php?page=tt-subscribe-support2.085.61
Advance Settings /wp-admin/admin.php?page=tt-subscribe-advance2.085.91
About /wp-admin/admin.php?page=tt-subscribe-about2.086.77
Subscriptions /wp-admin/admin.php?page=tt-subscribe-subscriptions2.085.70
Basic Settings /wp-admin/admin.php?page=tt-subscribe-basic2.086.92
TT-Subscribe /wp-admin/admin.php?page=tt-subscribe2.086.00

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 59 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_tt_subscribe_widget

Browser metrics Passed 4 tests

Checking browser requirements for TT - Subscribe
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,077 ▲31616.15 ▲1.5990.64 ▲89.1043.59 ▲3.35
Dashboard /wp-admin2,311 ▲1375.60 ▲0.0782.27 ▼0.2039.29 ▼5.12
Posts /wp-admin/edit.php2,202 ▲1022.03 ▼0.0139.62 ▲4.0537.68 ▲5.38
Add New Post /wp-admin/post-new.php1,574 ▲4823.21 ▲0.02669.07 ▼24.0053.64 ▲6.30
Media Library /wp-admin/upload.php1,528 ▲1254.27 ▲0.1293.90 ▼5.9841.15 ▼4.73
Support /wp-admin/admin.php?page=tt-subscribe-support1,1551.6622.2133.41
Advance Settings /wp-admin/admin.php?page=tt-subscribe-advance9761.6522.5233.18
About /wp-admin/admin.php?page=tt-subscribe-about1,0291.6626.2731.77
Subscriptions /wp-admin/admin.php?page=tt-subscribe-subscriptions1,1881.6722.9638.72
Basic Settings /wp-admin/admin.php?page=tt-subscribe-basic1,1121.6622.2434.35
TT-Subscribe /wp-admin/admin.php?page=tt-subscribe1,2631.7725.7635.33

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/tt-subscribe/framework/widget/settings.php+4
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_tt_subscribe_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tt-subscribe
    • > Deprecated in wp-content/plugins/tt-subscribe/framework/widget/settings.php+4
    Function create_function() is deprecated

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
Please take a closer look at the following
  • 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      require_once(TT_SUBSCRIBE_DIRframework/widget/settings.php): failed to open stream: No such file or directory in wp-content/plugins/tt-subscribe/framework/widget.php on line 2
    • > PHP Warning
      require_once(TT_SUBSCRIBE_DIRframework/admin/settings.php): failed to open stream: No such file or directory in wp-content/plugins/tt-subscribe/framework/admin.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/tt-subscribe/framework/widget/custom-codes.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tt-subscribe/framework/widget/settings.php:4
    • > PHP Fatal error
      require_once(): Failed opening required 'TT_SUBSCRIBE_DIRframework/widget/settings.php' (include_path='.:/usr/share/php') in wp-content/plugins/tt-subscribe/framework/widget.php on line 2
    • > PHP Warning
      Use of undefined constant TT_SUBSCRIBE_DIR - assumed 'TT_SUBSCRIBE_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/tt-subscribe/framework/admin.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'TT_SUBSCRIBE_DIRframework/admin/settings.php' (include_path='.:/usr/share/php') in wp-content/plugins/tt-subscribe/framework/admin.php on line 2
    • > PHP Warning
      Use of undefined constant TT_SUBSCRIBE_DIR - assumed 'TT_SUBSCRIBE_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/tt-subscribe/framework/widget.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/tt-subscribe/framework/admin/settings.php:110
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/tt-subscribe/tt-subscribe.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (TT-Subscribe Dashboard), #2 (TT-Subscribe Basic Settings), #3 (TT-Subscribe Subscriptions), #4 (TT-Subscribe Advance Settings)
  • Tags: You are using too many tags: 27 tag instead of maximum 10
Please take inspiration from this readme.txt

tt-subscribe/tt-subscribe.php 92% from 13 tests

The primary PHP file in "TT - Subscribe" version 4.0.5 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 511 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected6,332 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
CSS442241,877
Sass1326241,352
LESS1326331,343
PHP15114551,051
SVG100565
JavaScript21713106
Markdown114038

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
4 PNG files occupy 0.30MB with 0.18MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png120.65KB51.52KB▼ 57.30%
screenshot-3.png61.97KB24.20KB▼ 60.95%
screenshot-4.png54.94KB20.05KB▼ 63.50%
screenshot-2.png67.65KB27.10KB▼ 59.94%