68% watchtowerhq

Code Review | WatchTowerHQ

WordPress plugin WatchTowerHQ scored68%from 54 tests.

About plugin

  • Plugin page: watchtowerhq
  • Plugin version: 3.7.18
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.4
  • WordPress version: 6.3.1
  • First release: Jan 11, 2021
  • Latest release: Nov 8, 2023
  • Number of updates: 62
  • Update frequency: every 16.7 days
  • Top authors: watchtowerhq (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /9,631 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.26MB] [CPU: ▼0.56ms] Passed 4 tests

An overview of server-side resources used by WatchTowerHQ
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2642.99 ▲2.18
Dashboard /wp-admin3.56 ▲0.2148.59 ▼16.93
Posts /wp-admin/edit.php3.67 ▲0.3153.40 ▲5.97
Add New Post /wp-admin/post-new.php6.19 ▲0.30109.49 ▲15.30
Media Library /wp-admin/upload.php3.48 ▲0.2540.28 ▲6.53
Scheduled Actions /wp-admin/tools.php?page=action-scheduler3.6647.41
Watchtower Settings /wp-admin/options-general.php?page=watchtower-setting-admin3.4537.97

Server storage [IO: ▲3.05MB] [DB: ▲0.08MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 376 new files
Database: 5 new tables, 11 new options
New tables
wp_watchtower_logs
wp_actionscheduler_logs
wp_actionscheduler_claims
wp_actionscheduler_actions
wp_actionscheduler_groups
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
watchtower_db_version
widget_recent-posts
schema-ActionScheduler_LoggerSchema
theysaidso_admin_options
widget_recent-comments
action_scheduler_hybrid_store_demarkation
schema-ActionScheduler_StoreSchema
...

Browser metrics Passed 4 tests

An overview of browser requirements for WatchTowerHQ
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲3814.72 ▲0.511.73 ▼0.2640.45 ▼2.75
Dashboard /wp-admin2,206 ▲295.67 ▲0.1386.83 ▼15.4741.17 ▼2.10
Posts /wp-admin/edit.php2,108 ▲51.94 ▼0.0336.58 ▼0.8533.62 ▼2.44
Add New Post /wp-admin/post-new.php1,532 ▲623.23 ▼0.49574.55 ▼80.1351.50 ▼5.71
Media Library /wp-admin/upload.php1,411 ▲114.17 ▲0.03101.05 ▲0.0146.61 ▲4.29
Scheduled Actions /wp-admin/tools.php?page=action-scheduler1,2561.8225.5029.48
Watchtower Settings /wp-admin/options-general.php?page=watchtower-setting-admin8522.0128.0330.37

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie tables detected upon uninstall: 5 tables
    • wp_actionscheduler_groups
    • wp_actionscheduler_actions
    • wp_actionscheduler_claims
    • wp_actionscheduler_logs
    • wp_watchtower_logs
  • Zombie WordPress options were found after uninstall: 11 options
    • schema-ActionScheduler_LoggerSchema
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • watchtower_db_version
    • action_scheduler_hybrid_store_demarkation
    • watchtower
    • widget_theysaidso_widget
    • db_upgraded
    • schema-ActionScheduler_StoreSchema
    • ...

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
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/watchtowerhq/watchtowerhq.php
  • 97× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CronExpression_AbstractField' not found in wp-content/plugins/watchtowerhq/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_MonthField.php:8
    • > PHP Warning
      require_once(ztest/ztest.php): failed to open stream: No such file or directory in wp-content/plugins/watchtowerhq/vendor/shuber/curl/test/runner.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Abstract_Schedule' not found in wp-content/plugins/watchtowerhq/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_RecurringSchedule.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Schedule_Deprecated' not found in wp-content/plugins/watchtowerhq/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_Schedule.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'Druidfi\\Mysqldump\\Compress\\CompressInterface' not found in wp-content/plugins/watchtowerhq/vendor/druidfi/mysqldump-php/src/Compress/CompressNone.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Abstract_RecurringSchedule' not found in wp-content/plugins/watchtowerhq/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_CronSchedule.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/watchtowerhq/vendor/psr/http-message/src/ResponseInterface.php:20
    • > PHP Parse error
      syntax error, unexpected '|', expecting variable (T_VARIABLE) in wp-content/plugins/watchtowerhq/vendor/symfony/polyfill-mbstring/bootstrap80.php on line 15
    • > PHP Fatal error
      Uncaught Error: Class 'PhpZip\\Model\\Extra\\Fields\\AbstractUnicodeExtraField' not found in wp-content/plugins/watchtowerhq/vendor/nelexa/zip/src/Model/Extra/Fields/UnicodeCommentExtraField.php:58
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/watchtowerhq/src/class-updater-skin.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4, #5, #6 in watchtowerhq/assets to your readme.txt
  • Contributors: The plugin contributors field is not present
The official readme.txt is a good inspiration

watchtowerhq/watchtowerhq.php 92% from 13 tests

The principal PHP file in "WatchTowerHQ" v. 3.7.18 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected48,037 lines of code in 297 files:
LanguageFilesBlank linesComment linesLines of code
PHP2565,55214,25343,980
Markdown1945602,453
JSON14001,261
YAML4291177
CSS1180118
XML10023
Dockerfile112014
JavaScript13011

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity13.55
▷ Minimum class complexity1.00
▷ Maximum class complexity166.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces35
Interfaces22
Traits0
Classes200
▷ Abstract classes189.00%
▷ Concrete classes18291.00%
▷ Final classes2815.38%
Methods1,824
▷ Static methods27314.97%
▷ Public methods1,49481.91%
▷ Protected methods19110.47%
▷ Private methods1397.62%
Functions207
▷ Named functions16680.19%
▷ Anonymous functions4119.81%
Constants250
▷ Global constants2610.40%
▷ Class constants22489.60%
▷ Public constants21395.09%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png3.46KB1.55KB▼ 55.21%
assets/images/logo1x.png5.84KB1.42KB▼ 75.77%
assets/images/logo2x.png9.06KB2.72KB▼ 70.01%