78% calendar-to-events

Code Review | Calendar-To-Events

WordPress plugin Calendar-To-Events scored78%from 54 tests.

About plugin

  • Plugin page: calendar-to-events
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3.1
  • WordPress version: 6.3.1
  • First release: Jul 30, 2019
  • Latest release: Dec 14, 2019
  • Number of updates: 7
  • Update frequency: every 19.6 days
  • Top authors: yaleksandr89 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,026 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼0.25ms] Passed 4 tests

An overview of server-side resources used by Calendar-To-Events
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.91 ▲4.21
Dashboard /wp-admin3.35 ▲0.0046.94 ▼11.65
Posts /wp-admin/edit.php3.40 ▲0.0445.38 ▲2.20
Add New Post /wp-admin/post-new.php6.05 ▲0.1786.22 ▲4.24
Media Library /wp-admin/upload.php3.27 ▲0.0441.81 ▲6.31
Календари /wp-admin/edit-tags.php?taxonomy=cal2eve_calendars&post_type=cal2eve_events3.2638.15
События /wp-admin/edit.php?post_type=cal2eve_events3.3137.23
Страны /wp-admin/edit-tags.php?taxonomy=cal2eve_cities&post_type=cal2eve_events3.2631.93
Добавить событие /wp-admin/post-new.php?post_type=cal2eve_events3.3245.28

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Calendar-To-Events: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,936 ▲19013.51 ▼0.879.13 ▲7.4241.37 ▲1.77
Dashboard /wp-admin2,246 ▲665.56 ▼0.0096.19 ▲6.0743.38 ▼1.45
Posts /wp-admin/edit.php2,154 ▲542.01 ▼0.0037.03 ▲2.0133.69 ▼1.69
Add New Post /wp-admin/post-new.php1,569 ▲4323.14 ▲0.22699.20 ▲30.7067.65 ▲9.81
Media Library /wp-admin/upload.php1,451 ▲514.15 ▼0.10130.48 ▲25.2055.26 ▲9.79
Календари /wp-admin/edit-tags.php?taxonomy=cal2eve_calendars&post_type=cal2eve_events1,3252.2828.7332.31
События /wp-admin/edit.php?post_type=cal2eve_events1,2901.9534.6232.04
Страны /wp-admin/edit-tags.php?taxonomy=cal2eve_cities&post_type=cal2eve_events1,3312.2830.7735.00
Добавить событие /wp-admin/post-new.php?post_type=cal2eve_events1,9442.6152.5851.10

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/calendar-to-events/cal2eve.php
  • 23× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/calendar-to-events/views/taxonomy/cal2eve-cities.php:1
    • > PHP Fatal error
      require_once(): Failed opening required 'CAL_TO_EVE_PATH/models/events.php' (include_path='.:/usr/share/php') in wp-content/plugins/calendar-to-events/controllers/plugin_management/activate.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'CAL_TO_EVE_PATH/models/custom_post_type.php' (include_path='.:/usr/share/php') in wp-content/plugins/calendar-to-events/controllers/register_post_type.php on line 2
    • > PHP Warning
      Use of undefined constant CAL_TO_EVE_PATH - assumed 'CAL_TO_EVE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/calendar-to-events/controllers/plugin_management/deactivate.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/calendar-to-events/views/cal2eve-events.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/calendar-to-events/controllers/shortcode.php:2
    • > PHP Fatal error
      require_once(): Failed opening required 'CAL_TO_EVE_PATH/models/events.php' (include_path='.:/usr/share/php') in wp-content/plugins/calendar-to-events/controllers/plugin_management/deactivate.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/calendar-to-events/views/taxonomy/cal2eve-calendars.php:1
    • > PHP Warning
      require_once(CAL_TO_EVE_PATH/models/events.php): failed to open stream: No such file or directory in wp-content/plugins/calendar-to-events/controllers/plugin_management/deactivate.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'CAL_TO_EVE_PATH/models/events.php' (include_path='.:/usr/share/php') in wp-content/plugins/calendar-to-events/controllers/plugin_management/uninstall.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: cal2eve, calendar, calendar-to-events, organizer, calendars...

calendar-to-events/cal2eve.php 85% from 13 tests

The main file in "Calendar-To-Events" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.0" instead of "5.0")
  • Main file name: Name the main plugin file the same as the plugin slug ("calendar-to-events.php" instead of "cal2eve.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin1,299 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP164056587
JavaScript15051369
CSS23722343

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin