10% alt-calendar

Code Review | Alt Calendar

WordPress plugin Alt Calendar scored10%from 54 tests.

About plugin

  • Plugin page: alt-calendar
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.5
  • WordPress version: 6.3.1
  • First release: May 6, 2016
  • Latest release: Sep 6, 2016
  • Number of updates: 7
  • Update frequency: every 18.9 days
  • Top authors: kalvot (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /731 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/alt-calendar/Gloves/PluginMenu.php+89
    count(): Parameter must be an array or an object that implements Countable

Server metrics [RAM: ▼1.78MB] [CPU: ▼52.21ms] Passed 4 tests

A check of server-side resources used by Alt Calendar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.21 ▼1.256.69 ▼37.93
Dashboard /wp-admin2.23 ▼1.0710.64 ▼48.12
Posts /wp-admin/edit.php2.23 ▼1.1311.30 ▼35.83
Add New Post /wp-admin/post-new.php2.23 ▼3.6610.12 ▼86.96
Media Library /wp-admin/upload.php2.23 ▼1.009.82 ▼25.71
Calendars /wp-admin/edit-tags.php?taxonomy=alt-calendar&post_type=calendar_event2.239.86
Events /wp-admin/edit.php?post_type=calendar_event2.239.33
Alt Calendar /wp-admin/admin.php?page=alt-calendar2.239.38

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 120 new files
Database: no new tables, 10 new options
New WordPress options
default_calendar
installed
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_alt_widget
widget_recent-comments
theysaidso_admin_options
styling
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Alt Calendar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,964 ▲20215.42 ▲1.1839.71 ▲37.9439.09 ▼4.65
Dashboard /wp-admin2,241 ▲675.70 ▲0.05100.23 ▲8.2241.91 ▲2.03
Posts /wp-admin/edit.php2,142 ▲422.06 ▲0.0344.67 ▲3.2734.34 ▲0.02
Add New Post /wp-admin/post-new.php1,565 ▲3923.66 ▲0.40609.05 ▼14.8253.33 ▼13.51
Media Library /wp-admin/upload.php1,445 ▲484.26 ▲0.06103.91 ▼1.9242.10 ▼0.79
Calendars /wp-admin/edit-tags.php?taxonomy=alt-calendar&post_type=calendar_event1,3962.3435.1329.99
Events /wp-admin/edit.php?post_type=calendar_event1,6852.0236.8831.88
Alt Calendar /wp-admin/admin.php?page=alt-calendar9381.8432.9729.95

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/alt-calendar/Gloves/PluginMenu.php+89
    count(): Parameter must be an array or an object that implements Countable
  • The plugin did not uninstall successfully, leaving 120 files (1.31MB) in the plugin directory
    • (new file) Gloves/Module.php
    • (new file) Gloves/AbstractMetaBox.php
    • (new file) Gloves/Config.php
    • (new file) Gloves/Logger.php
    • (new file) Gloves/Plugin.php
    • (new file) Gloves/PluginSettings.php
    • (new file) Gloves/Render.php
    • (new file) Gloves/PostType.php
    • (new file) Gloves/PluginMenu.php
    • (new file) Gloves/Model/Model.php
    • ...
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • recovery_mode_email_last_sent
    • widget_alt_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=alt-calendar
    • > POST request to /wp-admin/admin-ajax.php
    • > Warning in wp-content/plugins/alt-calendar/Gloves/PluginMenu.php+89
    count(): Parameter must be an array or an object that implements Countable

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 17× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/alt-calendar/Module/Widget.php
    • > /wp-content/plugins/alt-calendar/Gloves/Template/Widget.php
    • > /wp-content/plugins/alt-calendar/Gloves/Module.php
    • > /wp-content/plugins/alt-calendar/Gloves/Plugin.php
    • > /wp-content/plugins/alt-calendar/Gloves/Template/Standard.php
    • > /wp-content/plugins/alt-calendar/Gloves/PluginSettings.php
    • > /wp-content/plugins/alt-calendar/Gloves/PostType.php
    • > /wp-content/plugins/alt-calendar/alt-calendar.php
    • > /wp-content/plugins/alt-calendar/glovesCLI.php
    • > /wp-content/plugins/alt-calendar/Gloves/Taxonomy.php
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/alt-calendar/views/settings.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Gloves\\PostType' not found in wp-content/plugins/alt-calendar/Module/Event.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/alt-calendar/views/dialog.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Gloves\\Taxonomy' not found in wp-content/plugins/alt-calendar/Module/Calendar.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Gloves\\AbstractMetaBox' not found in wp-content/plugins/alt-calendar/Module/MetaBox.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Gloves\\ScriptsManager' not found in wp-content/plugins/alt-calendar/Module/PluginManager.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: organizer, schedule, calendar, events, google calendar...

alt-calendar/glovesCLI.php 69% from 13 tests

"Alt Calendar" version 0.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Domain Path: Please prefix the domain path with a forward slash character ("/")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("alt-calendar.php" instead of "glovesCLI.php")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("")

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
Everything looks great! No dangerous files found in this plugin10,640 lines of code in 97 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript622,8561,7008,112
PHP273432341,372
CSS6308196938
PO File285100218

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity5.86
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity2.02
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces4
Interfaces0
Traits1
Classes21
▷ Abstract classes628.57%
▷ Concrete classes1571.43%
▷ Final classes00.00%
Methods115
▷ Static methods8170.43%
▷ Public methods10288.70%
▷ Protected methods76.09%
▷ Private methods65.22%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
14 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/fullcalendar/lib/cupertino/images/ui-bg_highlight-hard_70_000000_1x100.png0.28KB0.16KB▼ 44.10%
assets/fullcalendar/lib/cupertino/images/ui-icons_3d80b3_256x240.png4.49KB4.18KB▼ 6.89%
assets/fullcalendar/lib/cupertino/images/ui-bg_glass_100_e4f1fb_1x400.png0.38KB0.16KB▼ 58.87%
assets/fullcalendar/lib/cupertino/images/ui-bg_highlight-soft_25_ffef8f_1x100.png0.34KB0.17KB▼ 50.86%
assets/fullcalendar/lib/cupertino/images/ui-icons_2694e8_256x240.png4.49KB4.18KB▼ 6.89%