84% periodical-widget-visibility

Code Review | Periodical Widget Visibility

WordPress plugin Periodical Widget Visibility scored 84% from 54 tests.

About plugin

  • Plugin page: periodical-widget...
  • Plugin version: 2.3.7
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.2
  • WordPress version: 6.3.1
  • First release: Apr 13, 2016
  • Latest release: Feb 21, 2023
  • Number of updates: 47
  • Update frequency: every 53.3 days
  • Top authors: Hinjiriyo (72.34%)kybernetikservices (29.79%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 2,576 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.92ms] Passed 4 tests

Analyzing server-side resources used by Periodical Widget Visibility
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0337.78 ▼0.21
Dashboard /wp-admin3.32 ▲0.0243.53 ▼3.53
Posts /wp-admin/edit.php3.37 ▲0.0145.20 ▼4.86
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.53 ▼7.07
Media Library /wp-admin/upload.php3.24 ▲0.0134.86 ▲2.43

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Periodical Widget Visibility
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲7413.28 ▲0.024.89 ▲2.9644.32 ▼4.94
Dashboard /wp-admin2,212 ▲214.91 ▼1.05122.21 ▲17.8352.70 ▲12.26
Posts /wp-admin/edit.php2,100 ▲82.01 ▲0.0339.72 ▲0.1437.90 ▲1.60
Add New Post /wp-admin/post-new.php1,547 ▲923.29 ▲0.14661.93 ▲20.2254.76 ▼5.64
Media Library /wp-admin/upload.php1,397 ▲64.32 ▲0.0996.05 ▲2.1143.22 ▲1.53

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • 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
Good news, no errors were detected

SRP 50% from 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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/periodical-widget-visibility/admin/partials/formfields.php:17

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 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
Attributes that require attention:
  • Tags: You are using too many tags: 21 tag instead of maximum 10
You can look at the official readme.txt

periodical-widget-visibility/periodical-widget-visibility.php Passed 13 tests

The entry point to "Periodical Widget Visibility" version 2.3.7 is a PHP file that has certain tags in its header comment area
102 characters long description:
Control the periodical visibility of each widget based on weekdays within a yearly time period easily.

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
Good job! No executable or dangerous file extensions detected767 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP11197612548
PO File23848132
Markdown134055
CSS10219
JavaScript10813

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.38
Average class complexity11.43
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity3.35
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods31
▷ Static methods412.90%
▷ Public methods2270.97%
▷ Protected methods00.00%
▷ Private methods929.03%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin