72% calendar-archives

Code Review | Calendar Archives

WordPress plugin Calendar Archives scored72%from 54 tests.

About plugin

  • Plugin page: calendar-archives
  • Plugin version: 3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Aug 21, 2009
  • Latest release: Feb 7, 2013
  • Number of updates: 48
  • Update frequency: every 26.4 days
  • Top authors: amitbadkas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /19,241 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼7.55ms] Passed 4 tests

This is a short check of server-side resources used by Calendar Archives
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1138.71 ▲1.54
Dashboard /wp-admin3.43 ▲0.0946.70 ▼12.46
Posts /wp-admin/edit.php3.55 ▲0.1942.73 ▲4.68
Add New Post /wp-admin/post-new.php6.01 ▲0.1379.75 ▼19.57
Media Library /wp-admin/upload.php3.36 ▲0.1334.78 ▲0.28

Server storage [IO: ▲0.06MB] [DB: ▲0.31MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
CalendarArchives_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Calendar Archives
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.29 ▼1.395.18 ▲3.4643.10 ▼0.88
Dashboard /wp-admin2,210 ▲225.80 ▼0.05111.81 ▼2.6441.08 ▼7.21
Posts /wp-admin/edit.php2,096 ▲71.99 ▼0.0034.21 ▼9.1830.69 ▼6.18
Add New Post /wp-admin/post-new.php1,541 ▲1422.93 ▲4.55696.79 ▲81.0457.51 ▲7.87
Media Library /wp-admin/upload.php1,395 ▲104.21 ▼0.0695.86 ▲1.4640.49 ▼1.51
Calendar Archives /wp-admin/calendar-archives.php260.440.0912.67

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please take a closer look at the following
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/calendar-archives/calendar-layout-2.css.php
    • > /wp-content/plugins/calendar-archives/calendar-layout-1.css.php
    • > /wp-content/plugins/calendar-archives/calendar-layout-1.php
    • > /wp-content/plugins/calendar-archives/calendar-layout-2.php
  • 373× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: year in wp-content/plugins/calendar-archives/calendar-layout-2.php on line 108
    • > PHP Notice
      Undefined variable: firstDayOfWeek in wp-content/plugins/calendar-archives/calendar-layout-2.php on line 52
    • > PHP Notice
      Undefined variable: month in wp-content/plugins/calendar-archives/calendar-layout-2.php on line 64
    • > PHP Notice
      Undefined variable: firstDayOfWeek in wp-content/plugins/calendar-archives/calendar-layout-2.php on line 52
    • > PHP Notice
      Undefined variable: firstDayOfWeek in wp-content/plugins/calendar-archives/calendar-layout-1.php on line 55
    • > PHP Notice
      Undefined variable: boxDimension in wp-content/plugins/calendar-archives/calendar-layout-1.css.php on line 25
    • > PHP Notice
      Undefined variable: firstDayOfWeek in wp-content/plugins/calendar-archives/calendar-layout-2.php on line 52
    • > PHP Notice
      Undefined variable: month in wp-content/plugins/calendar-archives/calendar-layout-2.php on line 86
    • > PHP Notice
      Undefined variable: month in wp-content/plugins/calendar-archives/calendar-layout-1.php on line 76
    • > PHP Notice
      Undefined variable: firstDayOfWeek in wp-content/plugins/calendar-archives/calendar-layout-2.php on line 52

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/calendar-archives.php
    • > Network (severe)
    wp-admin/calendar-archives.php - Failed to load resource: the server responded with a status of 404 (Not Found)

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
2 plugin tags: archives, calendar

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

The principal PHP file in "Calendar Archives" v. 3.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 276 characters long)

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 detected964 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP7217264938
JavaScript110026

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity34.50
▷ Minimum class complexity5.00
▷ Maximum class complexity64.00
Average method complexity3.03
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods33
▷ Static methods00.00%
▷ Public methods33100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin