73% spiffy-calendar

Code Review | Spiffy Calendar

WordPress plugin Spiffy Calendar scored73%from 54 tests.

About plugin

  • Plugin page: spiffy-calendar
  • Plugin version: 4.9.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.4
  • WordPress version: 6.3.1
  • First release: Nov 19, 2012
  • Latest release: Nov 30, 2023
  • Number of updates: 320
  • Update frequency: every 12.6 days
  • Top authors: BStofko (47.5%)spiffyplugins (44.69%)SunnyThemes (8.44%)

Code review

54 tests

User reviews

38 reviews

Install metrics

3,000+ active /158,863 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.86MB] [CPU: ▲0.39ms] Passed 4 tests

This is a short check of server-side resources used by Spiffy Calendar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.36 ▲0.9046.30 ▲4.72
Dashboard /wp-admin4.21 ▲0.8654.76 ▼3.60
Posts /wp-admin/edit.php4.26 ▲0.9052.51 ▲4.58
Add New Post /wp-admin/post-new.php6.73 ▲0.8495.70 ▼4.14
Media Library /wp-admin/upload.php4.07 ▲0.8445.61 ▲12.38
Options /wp-admin/admin.php?page=spiffy-calendar&tab=options4.1740.00
Add Event /wp-admin/admin.php?page=spiffy-calendar&tab=event_edit&action=add4.1143.44
Categories /wp-admin/admin.php?page=spiffy-calendar&tab=categories4.1141.83
Manage Events /wp-admin/admin.php?page=spiffy-calendar4.0841.69

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 47 new files
Database: 3 new tables, 11 new options
New tables
wp_spiffy_calendar_meta
wp_spiffy_calendar_categories
wp_spiffy_calendar
New WordPress options
can_compress_scripts
widget_spiffy_minical_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_spiffy_today_widget
widget_recent-comments
widget_spiffy_upcoming_widget
spiffy_calendar_options
...

Browser metrics Passed 4 tests

A check of browser resources used by Spiffy Calendar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲14614.14 ▼0.571.78 ▼0.0039.06 ▼4.18
Dashboard /wp-admin2,288 ▲1115.67 ▲0.0592.65 ▼2.2042.50 ▲0.67
Posts /wp-admin/edit.php2,196 ▲962.01 ▲0.0640.53 ▼2.4836.65 ▲1.63
Add New Post /wp-admin/post-new.php6,424 ▲4,89827.86 ▲4.93924.87 ▲287.4164.67 ▲11.84
Media Library /wp-admin/upload.php1,494 ▲944.23 ▲0.03105.30 ▲10.2043.06 ▲1.02
Options /wp-admin/admin.php?page=spiffy-calendar&tab=options1,7233.6473.2129.49
Add Event /wp-admin/admin.php?page=spiffy-calendar&tab=event_edit&action=add1,5333.4450.3930.41
Categories /wp-admin/admin.php?page=spiffy-calendar&tab=categories1,3523.4456.3327.54
Manage Events /wp-admin/admin.php?page=spiffy-calendar1,5183.5945.2332.56

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/spiffy-calendar/uninstall.php+9
    Constant WP_SPIFFYCAL_TABLE already defined
  • Zombie WordPress options detected upon uninstall: 10 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_spiffy_today_widget
    • db_upgraded
    • widget_spiffy_featured_widget
    • widget_spiffy_upcoming_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_spiffy_minical_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/spiffy-calendar/spiffy-calendar.php on line 36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/spiffy-calendar/spiffy-calendar.php:40
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/spiffy-calendar/spiffy-calendar.php on line 36
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/spiffy-calendar/spiffy-calendar.php on line 36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
  • Screenshots: Please add images for these screenshots: #1 (Full calendar with category color as background color, and detailed display turned off to hide images), #2 (Full calendar, category color used for text and detailed display turned off), #3 (Mini calendar), #4 (Add an event), #5 (Responsive 3-column display), #6 (Shortcode generator in the classic editor), #7 (Calendar options), #8 (Upcoming events list, popup view has details appear when hovering over event title), #9 (Upcoming events list, expanded view)
Please take inspiration from this readme.txt

spiffy-calendar/spiffy-calendar.php Passed 13 tests

This is the main PHP file of "Spiffy Calendar" version 4.9.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
135 characters long description:
A full featured, simple to use Spiffy Calendar plugin for WordPress that allows you to manage and display your events and appointments.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin7,203 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP177508334,395
PO File57691,1191,855
CSS13315643
JavaScript34275310

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity83.44
▷ Minimum class complexity4.00
▷ Maximum class complexity422.00
Average method complexity7.57
▷ Minimum method complexity1.00
▷ Maximum method complexity93.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods113
▷ Static methods00.00%
▷ Public methods11198.23%
▷ Protected methods10.88%
▷ Private methods10.88%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
9 PNG files occupy 0.65MB with 0.34MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png27.84KB12.48KB▼ 55.19%
screenshot-2.png28.47KB12.88KB▼ 54.77%
screenshot-6.png16.20KB8.71KB▼ 46.25%
screenshot-7.png51.12KB26.58KB▼ 48.00%
screenshot-4.png39.17KB15.46KB▼ 60.52%