90% gcal-days

Code Review | GCal Days

WordPress plugin GCal Days scored 90% from 54 tests.

About plugin

  • Plugin page: gcal-days
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.5
  • WordPress version: 6.3.1
  • First release: Mar 25, 2014
  • Latest release: May 26, 2016
  • Number of updates: 6
  • Update frequency: every 132.2 days
  • Top authors: coffee2code (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,565 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼4.00ms] Passed 4 tests

Analyzing server-side resources used by GCal Days
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0838.19 ▼4.04
Dashboard /wp-admin3.43 ▲0.1345.74 ▼0.04
Posts /wp-admin/edit.php3.54 ▲0.1946.69 ▲1.88
Add New Post /wp-admin/post-new.php6.01 ▲0.1282.30 ▼13.80
Media Library /wp-admin/upload.php3.35 ▲0.1237.74 ▲5.30
GCal Days /wp-admin/options-general.php?page=c2c_GCalDaysSettings3.3235.55

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for GCal Days
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.20 ▼1.191.67 ▼0.0139.71 ▼7.61
Dashboard /wp-admin2,204 ▲195.82 ▲0.94104.44 ▲2.2338.57 ▼5.63
Posts /wp-admin/edit.php2,090 ▲42.05 ▲0.0539.90 ▲5.1634.36 ▼1.63
Add New Post /wp-admin/post-new.php1,536 ▲823.30 ▲0.46665.78 ▲9.0347.80 ▼12.96
Media Library /wp-admin/upload.php1,395 ▲74.20 ▼0.01105.40 ▼2.2945.89 ▼2.66
GCal Days /wp-admin/options-general.php?page=c2c_GCalDaysSettings8292.0524.9026.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: calendar, days since, gcal, google, coffee2code...

gcal-days/gcal-days.php 92% from 13 tests

This is the main PHP file of "GCal Days" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 144 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin526 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP4161408526

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity23.33
▷ Minimum class complexity6.00
▷ Maximum class complexity32.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods36
▷ Static methods36100.00%
▷ Public methods3597.22%
▷ Protected methods00.00%
▷ Private methods12.78%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected