73% tz-wrs-core

Code Review | Tz Weekly Radio Schedule

WordPress plugin Tz Weekly Radio Schedule scored73%from 54 tests.

About plugin

  • Plugin page: tz-wrs-core
  • Plugin version: 1.8.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8
  • WordPress version: 6.3.1
  • First release: Dec 7, 2021
  • Latest release: Dec 7, 2021
  • Number of updates: 8
  • Update frequency: every 31.4 days
  • Top authors: Lineone (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /521 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲1.61MB] [CPU: ▲24.09ms] Passed 4 tests

Server-side resources used by Tz Weekly Radio Schedule
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /5.09 ▲1.63385.15 ▲343.44
Dashboard /wp-admin4.94 ▲1.6470.36 ▲20.41
Posts /wp-admin/edit.php4.94 ▲1.5875.71 ▲25.67
Add New Post /wp-admin/post-new.php7.54 ▲1.65119.27 ▲24.10
Media Library /wp-admin/upload.php4.84 ▲1.6056.89 ▲26.16
Tz Weekly Radio Schedule /wp-admin/options-general.php?page=tz-weekly-radio-schedule4.8767.75

Server storage [IO: ▲1.02MB] [DB: ▲0.02MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 59 new files
Database: 4 new tables, 22 new options
New tables
wp_wrs_author_subscribe
wp_wrs_this_week
wp_wrs_next_week
wp_wrs_author_followers
New WordPress options
tzwrs_wrs_default_avatar_size
widget_theysaidso_widget
tzwrs_wrs_max_name_chars
tzwrs_wrs_background_color
widget_recent-posts
tzwrs_wrs_header_footer_background_color
tzwrs_wrs_need_approval
can_compress_scripts
theysaidso_admin_options
tzwrs_wrs_text_color
...

Browser metrics Passed 4 tests

Tz Weekly Radio Schedule: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,513 ▲75215.52 ▲1.408.34 ▲6.5153.37 ▲5.91
Dashboard /wp-admin2,441 ▲2676.50 ▲0.95122.16 ▲27.1548.33 ▲6.51
Posts /wp-admin/edit.php2,375 ▲2753.72 ▲1.7656.89 ▲17.3437.63 ▲3.95
Add New Post /wp-admin/post-new.php1,617 ▲9123.15 ▲0.03600.72 ▼27.8435.26 ▼16.75
Media Library /wp-admin/upload.php1,512 ▲1154.47 ▲0.2885.83 ▼14.1444.24 ▼1.40
Tz Weekly Radio Schedule /wp-admin/options-general.php?page=tz-weekly-radio-schedule2,5614.5879.4547.45

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
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/tz-wrs-core/uninstall.php+41
    Constant TZWRS_OPTION_NAME already defined
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_wrsteam
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_wrsday
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% 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
Please fix the following
  • 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_next_scheduled() in wp-content/plugins/tz-wrs-core/public/class-tz-weekly-radio-schedule-public.php:5491
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/tz-wrs-core/includes/class-tz-weekly-radio-schedule-activator.php on line 273
    • > PHP Fatal error
      Uncaught Error: Class 'Gamajo_Template_Loader' not found in wp-content/plugins/tz-wrs-core/public/class-tz-weekly-radio-schedule-template-loader.php:13
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/tz-wrs-core/public/partials/content-followers.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/tz-wrs-core/public/partials/content-followers.php:24
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_charset_collate() on null in wp-content/plugins/tz-wrs-core/includes/class-tz-weekly-radio-schedule-activator.php:274
    • > PHP Notice
      Trying to get property 'user_id' of non-object in wp-content/plugins/tz-wrs-core/public/partials/content-followers.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tz-wrs-core/widgets/wrs-day-widget.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/tz-wrs-core/admin/partials/tz-weekly-radio-schedule-admin-display.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tz-wrs-core/widgets/wrs-team-widget.php:6

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

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
The official readme.txt is a good inspiration

tz-wrs-core/tz-wrs-core.php 77% from 13 tests

The principal PHP file in "Tz Weekly Radio Schedule" v. 1.8.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 184 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin13,569 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PHP179721,4557,009
CSS5529332,863
SVG12032,627
JavaScript7139167912
HTML487478158

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity86.27
▷ Minimum class complexity1.00
▷ Maximum class complexity840.00
Average method complexity6.36
▷ Minimum method complexity1.00
▷ Maximum method complexity93.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods174
▷ Static methods3922.41%
▷ Public methods16695.40%
▷ Protected methods31.72%
▷ Private methods52.87%
Functions11
▷ Named functions763.64%
▷ Anonymous functions436.36%
Constants22
▷ Global constants22100.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
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/fb-icon.png1.69KB1.68KB▼ 0.87%
images/tw-icon.png1.03KB0.69KB▼ 33.36%
images/wrs-logo.png11.00KB5.50KB▼ 49.96%