10% archives-calendar-widget

Code Review | Archives Calendar Widget

WordPress plugin Archives Calendar Widget scored10%from 54 tests.

About plugin

  • Plugin page: archives-calendar...
  • Plugin version: 1.0.15
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 6.3.1
  • First release: May 12, 2013
  • Latest release: Aug 7, 2023
  • Number of updates: 93
  • Update frequency: every 40.2 days
  • Top authors: alekart (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

4,000+ active /64,395 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/archives-calendar-widget/archives-calendar.php+64
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.20MB] [CPU: ▼6.95ms] Passed 4 tests

Analyzing server-side resources used by Archives Calendar Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2137.78 ▼0.13
Dashboard /wp-admin3.51 ▲0.1647.49 ▼12.99
Posts /wp-admin/edit.php3.62 ▲0.2747.92 ▼1.49
Add New Post /wp-admin/post-new.php6.09 ▲0.2084.21 ▼13.19
Media Library /wp-admin/upload.php3.43 ▲0.2039.29 ▲5.75
Archives Calendar /wp-admin/options-general.php?page=Archives_Calendar_Widget3.4328.09

Server storage [IO: ▲1.61MB] [DB: ▲0.01MB] Passed 3 tests

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Archives Calendar Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲11513.84 ▼0.898.32 ▲6.8242.40 ▲3.71
Dashboard /wp-admin2,199 ▲285.53 ▼0.0481.77 ▼5.5437.85 ▲0.68
Posts /wp-admin/edit.php2,104 ▲42.00 ▼0.0337.62 ▼0.6337.69 ▲7.67
Add New Post /wp-admin/post-new.php1,531 ▲523.39 ▼0.07597.04 ▼10.82105.57 ▲11.41
Media Library /wp-admin/upload.php1,407 ▲44.15 ▼0.0999.80 ▼1.2541.56 ▼1.73
Archives Calendar /wp-admin/options-general.php?page=Archives_Calendar_Widget1,5882.0726.2331.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • archivesCalendarThemer
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/archives-calendar-widget/arw-settings-view.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/archives-calendar-widget/arw-settings.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/archives-calendar-widget/arw-widget.php:9
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/archives-calendar-widget/arw-widget-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/archives-calendar-widget/arw-settings.php:7

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

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Plugin settings), #2 (Calendar Theme selector with preview), #3 (Widget settings), #4 (Widgets with different themes on the same page)
You can take inspiration from this readme.txt

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

"Archives Calendar Widget" version 1.0.15's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("archives-calendar-widget.php" instead of "archives-calendar.php")

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
No dangerous file extensions were detected4,881 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
Sass213061571,889
PHP82391011,608
PO File73816761,051
CSS11615315
JavaScript91018

PHP code Passed 2 tests

This is a very shot 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.34
Average class complexity7.00
▷ Minimum class complexity4.00
▷ Maximum class complexity11.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions42
▷ Named functions4095.24%
▷ Anonymous functions24.76%
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
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/themer.png49.03KB16.67KB▼ 66.00%