84% responsive-calendar-widget

Code Review | Responsive Calendar Widget

WordPress plugin Responsive Calendar Widget scored84%from 54 tests.

About plugin

  • Plugin page: responsive-calend...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.4
  • WordPress version: 6.3.1
  • First release: Sep 2, 2020
  • Latest release: Sep 2, 2020
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: adridi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /454 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.11ms] Passed 4 tests

Analyzing server-side resources used by Responsive Calendar Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.70 ▼3.65
Dashboard /wp-admin3.33 ▼0.0144.91 ▼16.35
Posts /wp-admin/edit.php3.39 ▲0.0348.82 ▲1.38
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.63 ▼1.23
Media Library /wp-admin/upload.php3.26 ▲0.0334.04 ▲0.79

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_responsivecalendarwidget_widget
widget_recent-comments

Browser metrics Passed 4 tests

Responsive Calendar Widget: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7214.73 ▲0.312.03 ▲0.5235.54 ▼4.56
Dashboard /wp-admin2,195 ▲215.62 ▲0.0993.36 ▲0.6942.28 ▲5.69
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0639.69 ▲4.2135.58 ▲0.49
Add New Post /wp-admin/post-new.php1,525 ▼123.34 ▲0.10603.47 ▼81.2453.20 ▼1.16
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.0498.01 ▼9.3145.69 ▲0.00

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_responsivecalendarwidget_widget
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • 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
Even though no errors were found, 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 fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/responsive-calendar-widget/includes/responsive-calendar-widget-class.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/responsive-calendar-widget/includes/responsive-calendar-widget-loader.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: plan, calendar, responsive, date

responsive-calendar-widget/responsive-calendar-widget.php 92% from 13 tests

"Responsive Calendar Widget" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.6" instead of "3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected343 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript11827142
PHP42858105
CSS116096

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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