83% widget-visibility-time-scheduler

Code Review | Widget Visibility Time Scheduler

WordPress plugin Widget Visibility Time Scheduler scored83%from 54 tests.

About plugin

  • Plugin page: widget-visibility...
  • Plugin version: 5.3.13
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.2
  • WordPress version: 6.3.1
  • First release: Dec 5, 2014
  • Latest release: Feb 21, 2023
  • Number of updates: 79
  • Update frequency: every 38.0 days
  • Top authors: Hinjiriyo (84.81%)kybernetikservices (16.46%)

Code review

54 tests

User reviews

8 reviews

Install metrics

2,000+ active /49,487 total downloads

Benchmarks

Plugin footprint 83% 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.01MB] [CPU: ▼3.57ms] Passed 4 tests

Analyzing server-side resources used by Widget Visibility Time Scheduler
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0133.19 ▼7.38
Dashboard /wp-admin3.32 ▲0.0144.24 ▼3.12
Posts /wp-admin/edit.php3.37 ▲0.0149.07 ▲3.42
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.48 ▼2.94
Media Library /wp-admin/upload.php3.24 ▲0.0133.26 ▼0.85

Server storage [IO: ▲0.13MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Widget Visibility Time Scheduler
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲9913.30 ▼1.131.74 ▼0.2037.98 ▼7.54
Dashboard /wp-admin2,215 ▲274.83 ▼0.25105.05 ▼9.0540.87 ▼5.16
Posts /wp-admin/edit.php2,094 ▲22.01 ▼0.1139.15 ▼2.1137.70 ▲1.91
Add New Post /wp-admin/post-new.php1,523 ▲917.77 ▲0.06654.91 ▼18.3159.83 ▲7.22
Media Library /wp-admin/upload.php1,400 ▲94.30 ▲0.14101.35 ▲4.8243.74 ▲2.92

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/widget-visibility-time-scheduler/admin/partials/hinjiwvts-fieldsets.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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 to be fixed:
  • Tags: You are using too many tags: 34 tag instead of maximum 10
The official readme.txt is a good inspiration

widget-visibility-time-scheduler/hinjiwvts.php 85% from 13 tests

Analyzing the main PHP file in "Widget Visibility Time Scheduler" version 5.3.13
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("widget-visibility-time-scheduler.php" instead of "hinjiwvts.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected1,219 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP10199683578
PO File9133168573
CSS40554
JavaScript20814

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity12.57
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity3.70
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods30
▷ Static methods516.67%
▷ Public methods2273.33%
▷ Protected methods00.00%
▷ Private methods826.67%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected