79% add-classes-to-googles-calendar

Code Review | Plugin Name: Add classes to Google Calendar

WordPress plugin Plugin Name: Add classes to Google Calendar scored79%from 54 tests.

About plugin

  • Plugin page: add-classes-to-go...
  • Plugin version: 1...
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.2
  • WordPress version: 6.3.1
  • First release: Jan 7, 2020
  • Latest release: Jan 7, 2020
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: dessainsaraiva (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /447 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 gracefully, with no errors

Server metrics [RAM: ▼1.94MB] [CPU: ▼54.54ms] Passed 4 tests

A check of server-side resources used by Plugin Name: Add classes to Google Calendar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.414.14 ▼37.46
Dashboard /wp-admin2.08 ▼1.275.26 ▼51.87
Posts /wp-admin/edit.php2.08 ▼1.286.57 ▼42.00
Add New Post /wp-admin/post-new.php2.08 ▼3.815.42 ▼86.82
Media Library /wp-admin/upload.php2.08 ▼1.155.15 ▼31.17

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Plugin Name: Add classes to Google Calendar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.33 ▼1.481.71 ▼0.1241.06 ▼3.45
Dashboard /wp-admin2,208 ▲204.84 ▼0.03105.59 ▲1.2141.12 ▲1.59
Posts /wp-admin/edit.php2,091 ▲22.01 ▼0.0433.79 ▼8.7232.15 ▼6.63
Add New Post /wp-admin/post-new.php1,530 ▼322.99 ▼0.12620.70 ▼54.5249.11 ▼7.79
Media Library /wp-admin/upload.php1,390 ▼14.22 ▲0.0193.24 ▼4.4740.21 ▼1.84

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the booking-sync handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Contributors: Plugin contributors field is missing
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === Plugin Name: Add classes to Google Calendar === )
You can take inspiration from this readme.txt

add-classes-to-googles-calendar/add-classes-to-google-calendar.php 85% from 13 tests

This is the main PHP file of "Plugin Name: Add classes to Google Calendar" version 1..., providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("add-classes-to-googles-calendar.php" instead of "add-classes-to-google-calendar.php")
  • Version: Use only periods and digits for the version number (ex. "1.0.3" instead of "1...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin43 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP116930
CSS11013

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.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
There are no PNG files in this plugin