79% ics-button

Code Review | ICS Button

WordPress plugin ICS Button scored 79% from 54 tests.

About plugin

  • Plugin page: ics-button
  • Plugin version: 0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.8.1
  • WordPress version: 6.3.1
  • First release: Apr 21, 2014
  • Latest release: Jun 25, 2014
  • Number of updates: 10
  • Update frequency: every 18.3 days
  • Top authors: Cleanshooter (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 2,288 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 gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.80ms] Passed 4 tests

Analyzing server-side resources used by ICS Button
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.80 ▼0.36
Dashboard /wp-admin3.32 ▲0.0244.85 ▼6.45
Posts /wp-admin/edit.php3.37 ▲0.0251.63 ▲5.34
Add New Post /wp-admin/post-new.php5.90 ▲0.0286.51 ▼11.30
Media Library /wp-admin/upload.php3.24 ▲0.0236.11 ▲2.90

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

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

Browser metrics Passed 4 tests

ICS Button: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲6814.47 ▼0.082.30 ▲0.5140.23 ▼2.07
Dashboard /wp-admin2,206 ▲185.86 ▲1.01103.07 ▼1.9340.48 ▲2.03
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0736.29 ▲1.5032.02 ▲0.59
Add New Post /wp-admin/post-new.php1,533 ▼023.42 ▲0.37615.75 ▲8.3749.78 ▼12.21
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.0295.69 ▼9.5541.17 ▼8.46

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ics-button/plugin/dialog.php
  • 1× 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/ics-button/ics-button.php:37

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 Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
1 plugin tags: ics calendar button tiny-mcd

ics-button/ics-button.php Passed 13 tests

The main file in "ICS Button" v. 0.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
83 characters long description:
Create a button (link) for an ICS file that is generated on the fly via javascript.

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
Good job! No executable or dangerous file extensions detected310 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP21920208
JavaScript26095
CSS1007

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
plugin/img/Calendar-Add.png7.25KB4.40KB▼ 39.38%