84% pretty-google-calendar

Code Review | Pretty Google Calendar

WordPress plugin Pretty Google Calendar scored84%from 54 tests.

About plugin

  • Plugin page: pretty-google-cal...
  • Plugin version: 1.6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 13, 2021
  • Latest release: Oct 3, 2023
  • Number of updates: 29
  • Update frequency: every 24.8 days
  • Top authors: lbell (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

2,000+ active /14,925 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.45ms] Passed 4 tests

Analyzing server-side resources used by Pretty Google Calendar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.26 ▲1.60
Dashboard /wp-admin3.37 ▲0.0652.16 ▼1.03
Posts /wp-admin/edit.php3.48 ▲0.1250.29 ▼3.28
Add New Post /wp-admin/post-new.php5.95 ▲0.0693.48 ▼7.07
Media Library /wp-admin/upload.php3.29 ▲0.0639.30 ▲4.59
Pretty Google Calendar Settings /wp-admin/options-general.php?page=pgcal-setting-admin3.2530.42

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Pretty Google Calendar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.22 ▼1.135.67 ▲4.0241.05 ▲0.71
Dashboard /wp-admin2,212 ▲204.86 ▼0.07109.17 ▼6.2344.42 ▲4.68
Posts /wp-admin/edit.php2,095 ▲32.06 ▲0.0240.65 ▲0.2236.54 ▼0.15
Add New Post /wp-admin/post-new.php1,533 ▲1923.32 ▲5.77626.55 ▲4.7160.49 ▲9.44
Media Library /wp-admin/upload.php1,394 ▲34.18 ▼0.01100.33 ▲0.4045.42 ▼2.13
Pretty Google Calendar Settings /wp-admin/options-general.php?page=pgcal-setting-admin8482.0225.8442.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/pretty-google-calendar/pretty-google-calendar.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pretty-google-calendar/init/init.php:63

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
8 plugin tags: google calendar, calendar, pretty calendar, fullcalendar, gcal...

pretty-google-calendar/pretty-google-calendar.php Passed 13 tests

The primary PHP file in "Pretty Google Calendar" version 1.6.2 is used by WordPress to initiate all plugin functionality
34 characters long description:
Google Calendars that aren't ugly.

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
Good job! No executable or dangerous file extensions detected2,910 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript9471132,568
PHP55695228
CSS6164105
SVG1009

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
4 PNG files occupy 0.44MB with 0.28MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png105.38KB38.14KB▼ 63.81%
assets/screenshot-2.png129.79KB46.08KB▼ 64.49%
assets/screenshot-4.png40.42KB13.58KB▼ 66.40%
assets/screenshot-3.png176.52KB67.98KB▼ 61.49%