84% simple-calendar-for-google

Code Review | Simple Calendar for Google

WordPress plugin Simple Calendar for Google scored84%from 54 tests.

About plugin

  • Plugin page: simple-calendar-f...
  • Plugin version: 2.19
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.4
  • WordPress version: 6.3.1
  • First release: Aug 4, 2019
  • Latest release: Nov 1, 2023
  • Number of updates: 58
  • Update frequency: every 26.7 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,327 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼3.82ms] Passed 4 tests

Server-side resources used by Simple Calendar for Google
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2043.50 ▼1.83
Dashboard /wp-admin3.51 ▲0.1652.49 ▼9.30
Posts /wp-admin/edit.php3.60 ▲0.2453.42 ▲1.87
Add New Post /wp-admin/post-new.php6.10 ▲0.2197.89 ▼2.17
Media Library /wp-admin/upload.php3.43 ▲0.2036.57 ▼1.96
Settings /wp-admin/admin.php?page=simplecalendarforgoogle-settings3.4035.56
Simple Calendar for Google /wp-admin/admin.php?page=simplecalendarforgoogle3.3935.03

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
scalg_admin
widget_recent-posts
widget_recent-comments
scalg_css
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Calendar for Google
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8014.08 ▼0.261.69 ▲0.0542.42 ▲2.84
Dashboard /wp-admin2,227 ▲505.62 ▲0.1091.64 ▲6.6637.51 ▼3.65
Posts /wp-admin/edit.php2,129 ▲321.95 ▼0.0740.15 ▲5.6835.28 ▼0.16
Add New Post /wp-admin/post-new.php6,220 ▲4,69219.21 ▼3.99833.36 ▲156.6655.30 ▼6.59
Media Library /wp-admin/upload.php1,435 ▲354.19 ▼0.0497.68 ▼16.2343.20 ▼6.78
Settings /wp-admin/admin.php?page=simplecalendarforgoogle-settings1,2772.4963.4528.86
Simple Calendar for Google /wp-admin/admin.php?page=simplecalendarforgoogle9811.9922.9332.28

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-calendar-for-google/lib/class-simplecalendarforgoogle.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-calendar-for-google/lib/class-simplecalendarforgoogleadmin.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-calendar-for-google/lib/class-simplecalendarforgoogleadmin.php:37

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: lists, google, block, calendar

simple-calendar-for-google/simplecalendarforgoogle.php 92% from 13 tests

"Simple Calendar for Google" version 2.19's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("simple-calendar-for-google.php" instead of "simplecalendarforgoogle.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected957 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP5102197831
JavaScript41236106
JSON10020
CSS13170

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity67.50
▷ Minimum class complexity47.00
▷ Maximum class complexity88.00
Average method complexity8.00
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods1473.68%
▷ Protected methods00.00%
▷ Private methods526.32%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected