78% wp-simple-calendar

Code Review | WP Simple Calendar

WordPress plugin WP Simple Calendar scored78%from 54 tests.

About plugin

  • Plugin page: wp-simple-calendar
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: WordPress 3.0-3.7.1
  • WordPress version: 6.3.1
  • First release: May 28, 2013
  • Latest release: Nov 8, 2016
  • Number of updates: 10
  • Update frequency: every 126.0 days
  • Top authors: vegasgeek (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /8,185 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.42MB] [CPU: ▼5.69ms] Passed 4 tests

This is a short check of server-side resources used by WP Simple Calendar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.3043.37 ▲2.35
Dashboard /wp-admin3.82 ▲0.4758.57 ▼4.01
Posts /wp-admin/edit.php3.84 ▲0.4858.22 ▲7.02
Add New Post /wp-admin/post-new.php6.35 ▲0.4691.66 ▼26.36
Media Library /wp-admin/upload.php3.68 ▲0.4543.53 ▲5.27
Add New Event /wp-admin/post-new.php?post_type=wpscevents4.0858.00
All Events /wp-admin/edit.php?post_type=wpscevents3.7941.65
Locations /wp-admin/edit-tags.php?taxonomy=wpsclocation&post_type=wpscevents3.6837.99
Categories /wp-admin/edit-tags.php?taxonomy=wpsccategory&post_type=wpscevents3.6836.24

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 342 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
recovery_mode_email_last_sent
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WP Simple Calendar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,975 ▲21413.54 ▼0.7310.92 ▲9.0041.21 ▼1.27
Dashboard /wp-admin2,244 ▲645.63 ▲0.0191.44 ▼4.5440.40 ▼4.58
Posts /wp-admin/edit.php2,149 ▲492.04 ▲0.0341.23 ▲1.4237.71 ▲1.89
Add New Post /wp-admin/post-new.php1,562 ▲3422.97 ▼0.19684.01 ▲32.3152.30 ▲3.42
Media Library /wp-admin/upload.php1,446 ▲494.27 ▲0.11109.71 ▲5.7846.86 ▲1.77
Add New Event /wp-admin/post-new.php?post_type=wpscevents1,5421.517.5935.72
All Events /wp-admin/edit.php?post_type=wpscevents1,1181.9533.6831.41
Locations /wp-admin/edit-tags.php?taxonomy=wpsclocation&post_type=wpscevents1,3222.2729.8030.86
Categories /wp-admin/edit-tags.php?taxonomy=wpsccategory&post_type=wpscevents1,3252.3029.1129.71

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • recovery_mode_email_last_sent
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/post-new.php?post_type=wpscevents
    • > Compile error in wp-content/plugins/wp-simple-calendar/includes/cmb2/includes/types/CMB2_Type_Text_Datetime_Timestamp.php+15
    Declaration of CMB2_Type_Text_Datetime_Timestamp::render() must be compatible with CMB2_Type_Text::render($args = Array)

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
Please take a closer look at the following
  • 33× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/wp-simple-calendar/includes/cmb2/includes/types/CMB2_Type_Taxonomy_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/wp-simple-calendar/includes/cmb2/includes/types/CMB2_Type_Colorpicker.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/wp-simple-calendar/includes/cmb2/includes/types/CMB2_Type_File_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_time() in wp-content/plugins/wp-simple-calendar/includes/grid-template.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Select' not found in wp-content/plugins/wp-simple-calendar/includes/cmb2/includes/types/CMB2_Type_Select_Timezone.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/wp-simple-calendar/includes/cmb2/includes/types/CMB2_Type_Oembed.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-simple-calendar/includes/list-template.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/wp-simple-calendar/includes/cmb2/includes/types/CMB2_Type_Taxonomy_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/wp-simple-calendar/includes/cmb2/includes/types/CMB2_Type_Text_Datetime_Timestamp_Timezone.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/wp-simple-calendar/includes/cmb2/includes/types/CMB2_Type_Picker_Base.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
1 plugin tags: calendar

wp-simple-calendar/wp-simple-calendar.php 92% from 13 tests

"WP Simple Calendar" version 2.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Requires at least: Periods and digits should be used for the required version number (ex. "7.0" instead of "WordPress 3.0")

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 plugin40,949 lines of code in 194 files:
LanguageFilesBlank linesComment linesLines of code
PO File11912,73116,33829,151
PHP491,4133,3494,871
CSS141,0311,0564,567
JavaScript63752091,544
Markdown33020747
JSON30069

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity14.11
▷ Minimum class complexity1.00
▷ Maximum class complexity145.00
Average method complexity3.45
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes56
▷ Abstract classes47.14%
▷ Concrete classes5292.86%
▷ Final classes00.00%
Methods301
▷ Static methods258.31%
▷ Public methods26487.71%
▷ Protected methods3411.30%
▷ Private methods31.00%
Functions48
▷ Named functions48100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants466.67%
▷ Class constants233.33%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
18 PNG files occupy 0.03MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/cmb2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
includes/cmb2/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%
includes/cmb2/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
includes/cmb2/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
includes/js/colorbox/images/loading_background.png0.15KB0.15KB▼ 0.64%