10% blog-post-calendar-widget

Code Review | Blog Post Calendar Widget

WordPress plugin Blog Post Calendar Widget scored10%from 54 tests.

About plugin

  • Plugin page: blog-post-calenda...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.5.1
  • WordPress version: 6.3.1
  • First release: Mar 31, 2013
  • Latest release: May 24, 2013
  • Number of updates: 10
  • Update frequency: every 5.5 days
  • Top authors: rzvagelsky (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

300+ active /13,474 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/blog-post-calendar-widget/wp-calendar.php+122
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_Calander_Widget has a deprecated constructor

Server metrics [RAM: ▼2.02MB] [CPU: ▼58.60ms] Passed 4 tests

Server-side resources used by Blog Post Calendar Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.25 ▼1.495.23 ▼39.80
Dashboard /wp-admin2.27 ▼1.307.22 ▼46.80
Posts /wp-admin/edit.php2.27 ▼1.415.88 ▼47.74
Add New Post /wp-admin/post-new.php2.27 ▼3.885.83 ▼100.05
Media Library /wp-admin/upload.php2.27 ▼1.227.50 ▼34.34

Server storage [IO: ▲0.18MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
It is recommended to fix the following issues
  • Illegal file modification found: 1 file (12.76KB) outside of "wp-content/plugins/blog-post-calendar-widget/" and "wp-content/uploads/"
    • (new file) wp-content/themes/twentytwentyone/wp_calendar.css
Filesystem: 25 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_wp_calander_widget
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Blog Post Calendar Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,884 ▲12314.73 ▲0.356.81 ▲4.9642.00 ▼0.84
Dashboard /wp-admin2,197 ▲205.65 ▲0.0196.97 ▲6.1442.96 ▼1.37
Posts /wp-admin/edit.php2,105 ▲52.04 ▲0.0435.97 ▼0.8833.78 ▲2.29
Add New Post /wp-admin/post-new.php1,545 ▲522.13 ▼1.14626.29 ▼71.8262.91 ▲0.31
Media Library /wp-admin/upload.php1,408 ▲144.22 ▲0.00102.58 ▲3.1844.16 ▼8.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/blog-post-calendar-widget/wp-calendar.php+122
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_Calander_Widget has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_wp_calander_widget
    • widget_recent-comments
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/blog-post-calendar-widget/wp-calendar.php on line 27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/blog-post-calendar-widget/wp-calendar.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: future posts, post types, events calendar, posts, widget...

blog-post-calendar-widget/wp-calendar.php 92% from 13 tests

The primary PHP file in "Blog Post Calendar Widget" version 1.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("blog-post-calendar-widget.php" instead of "wp-calendar.php")

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
Everything looks great! No dangerous files found in this plugin3,087 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript62012611,884
PHP15771524
CSS1512387
PO File4117122292

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity8.25
▷ Minimum method complexity1.00
▷ Maximum method complexity21.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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
5 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/macFFBgHack.png0.20KB0.09KB▼ 53.14%
images/arrow-next-hover.png2.84KB0.18KB▼ 93.75%
images/arrow-new.png2.84KB0.18KB▼ 93.71%
images/arrow-prev-hover.png2.83KB0.18KB▼ 93.70%
images/arrow-new2.png2.83KB0.18KB▼ 93.73%