78% smooth-calendar

Code Review | Smooth Calendar

WordPress plugin Smooth Calendar scored78%from 54 tests.

About plugin

  • Plugin page: smooth-calendar
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.4.2
  • WordPress version: 6.3.1
  • First release: Dec 7, 2015
  • Latest release: Feb 16, 2016
  • Number of updates: 9
  • Update frequency: every 8.0 days
  • Top authors: hetzelcreative (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,707 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼7.54ms] Passed 4 tests

A check of server-side resources used by Smooth Calendar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1539.62 ▲3.50
Dashboard /wp-admin3.44 ▲0.0944.36 ▼18.26
Posts /wp-admin/edit.php3.55 ▲0.1948.29 ▲6.01
Add New Post /wp-admin/post-new.php6.09 ▲0.2182.23 ▼15.74
Media Library /wp-admin/upload.php3.36 ▲0.1338.40 ▲0.33
Events /wp-admin/edit.php?post_type=calendar3.4034.31
Add New Event /wp-admin/post-new.php?post_type=calendar3.4846.65
Settings /wp-admin/edit.php?post_type=calendar&page=smooth-calendar-settings3.3331.10

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Smooth Calendar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,941 ▲19513.80 ▼0.555.53 ▲3.8246.62 ▲5.64
Dashboard /wp-admin2,258 ▲735.11 ▲0.21110.48 ▲5.5439.74 ▼4.66
Posts /wp-admin/edit.php2,125 ▲362.31 ▲0.3039.93 ▲3.6339.20 ▲3.80
Add New Post /wp-admin/post-new.php1,560 ▲1823.70 ▲5.62680.95 ▲29.5937.75 ▼18.28
Media Library /wp-admin/upload.php1,444 ▲534.34 ▲0.1289.12 ▼8.4144.07 ▲2.87
Events /wp-admin/edit.php?post_type=calendar1,0942.2733.3928.62
Add New Event /wp-admin/post-new.php?post_type=calendar2,2777.39145.1966.40
Settings /wp-admin/edit.php?post_type=calendar&page=smooth-calendar-settings1,2222.4951.4028.72

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/smooth-calendar/admin/partials/smooth-calendar-admin-display.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/smooth-calendar/public/single-calendar.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/smooth-calendar/admin/partials/smooth-calendar-admin-display-metabox.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/smooth-calendar/admin/partials/smooth-calendar-admin-options.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === smooth-calendar === )
The official readme.txt might help

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

Analyzing the main PHP file in "Smooth Calendar" version 1.2.1
47 characters long description:
A simple and flexible WordPress calendar plugin

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
There were no executable files found in this plugin1,082 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP15194645562
CSS24728297
JavaScript25122186
Markdown124037

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity3.43
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.47
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods37
▷ Static methods25.41%
▷ Public methods3286.49%
▷ Protected methods00.00%
▷ Private methods513.51%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
18 compressed PNG files occupy 0.70MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/desktop-default.png39.95KB37.54KB▼ 6.05%
assets/banner-772x250.png2.16KB1.13KB▼ 47.60%
public/images/desktop.png58.83KB59.26KB0.00%
public/images/dashboard.png86.21KB88.44KB0.00%
assets/mobile-default.png14.32KB14.35KB0.00%