80% th23-subscribe

Code Review | th23 Subscribe

WordPress plugin th23 Subscribe scored 80% from 54 tests.

About plugin

  • Plugin page: th23-subscribe
  • Plugin version: 3.2.0
  • PHP compatiblity: 5.6.32+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.4
  • WordPress version: 6.3.1
  • First release: May 21, 2019
  • Latest release: May 12, 2020
  • Number of updates: 5
  • Update frequency: every 71.4 days
  • Top authors: th23 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 634 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.46MB] [CPU: ▲4.07ms] Passed 4 tests

A check of server-side resources used by th23 Subscribe
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2544.20 ▲4.55
Dashboard /wp-admin3.88 ▲0.5851.94 ▲0.42
Posts /wp-admin/edit.php3.93 ▲0.5750.68 ▲5.64
Add New Post /wp-admin/post-new.php6.40 ▲0.5197.63 ▲7.21
Media Library /wp-admin/upload.php3.74 ▲0.5140.23 ▲5.67
Your Subscriptions /wp-admin/users.php?page=th23-subscribe-manage3.7937.16
th23 Subscribe /wp-admin/options-general.php?page=th23-subscribe3.7139.14

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 14 new files
Database: 2 new tables, 8 new options
New tables
wp_th23_subscribe_subscriptions
wp_th23_subscribe_notifications
New WordPress options
widget_theysaidso_widget
th23_subscribe_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_th23_subscribe_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for th23 Subscribe
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲7513.59 ▼0.791.77 ▼0.0340.72 ▼3.94
Dashboard /wp-admin2,211 ▲295.85 ▲0.9696.87 ▼5.1939.37 ▼7.84
Posts /wp-admin/edit.php2,097 ▲82.02 ▼0.0039.11 ▲2.3935.66 ▲2.15
Add New Post /wp-admin/post-new.php1,539 ▲323.03 ▼0.29579.70 ▼17.1456.04 ▲11.56
Media Library /wp-admin/upload.php1,393 ▲54.22 ▲0.0797.57 ▲0.3441.82 ▼0.92
Your Subscriptions /wp-admin/users.php?page=th23-subscribe-manage7802.0728.8828.06
th23 Subscribe /wp-admin/options-general.php?page=th23-subscribe1,2012.2227.0448.55

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_th23_subscribe_subscriptions
    • wp_th23_subscribe_notifications
  • Zombie WordPress options detected upon uninstall: 8 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_th23_subscribe_widget
    • widget_recent-comments
    • th23_subscribe_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Tags: There are too many tags (13 tag instead of maximum 10)
You can take inspiration from this readme.txt

th23-subscribe/th23-subscribe.php Passed 13 tests

The main PHP script in "th23 Subscribe" version 3.2.0 is automatically included on every request by WordPress
136 characters long description:
Subscribe for email notifactions upon new posts and comments. Easy way keep registered users and visitors informed about latest updates.

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
There were no executable files found in this plugin3,405 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP33714492,276
PO File1212276769
CSS21021233
JavaScript21623127

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity113.00
▷ Minimum class complexity1.00
▷ Maximum class complexity244.00
Average method complexity6.46
▷ Minimum method complexity1.00
▷ Maximum method complexity75.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods82
▷ Static methods00.00%
▷ Public methods82100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/th23-subscribe-horizontal.png6.44KB1.84KB▼ 71.45%
img/th23-subscribe-square.png8.45KB1.54KB▼ 81.81%