10% myeventcalendar

Code Review | MyEventCalendar

WordPress plugin MyEventCalendar scored 10% from 54 tests.

About plugin

  • Plugin page: myeventcalendar
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-1.0.0
  • WordPress version: 6.3.1
  • First release: Mar 24, 2020
  • Latest release: Mar 24, 2020
  • Number of updates: 8
  • Update frequency: N/A
  • Top authors: machinerallydevelopers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 398 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method MyEventCalendar::mec_activate() should not be called statically

Server metrics [RAM: ▼1.20MB] [CPU: ▼39.92ms] Passed 4 tests

Server-side resources used by MyEventCalendar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.77 ▼0.6914.61 ▼27.39
Dashboard /wp-admin2.81 ▼0.4916.83 ▼29.71
Posts /wp-admin/edit.php2.81 ▼0.5416.34 ▼29.43
Add New Post /wp-admin/post-new.php2.81 ▼3.0718.37 ▼73.16
Media Library /wp-admin/upload.php2.81 ▼0.4216.85 ▼16.56

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 18 new files
Database: 1 new table, 8 new options
New tables
wp_calendar_events
New WordPress options
mec_tables_created
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
mec_settings
can_compress_scripts

Browser metrics Passed 4 tests

MyEventCalendar: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,076 ▲33017.39 ▲3.0284.05 ▲82.0033.98 ▼4.10
Dashboard /wp-admin2,224 ▲336.08 ▲1.23116.14 ▲12.0683.98 ▲38.24
Posts /wp-admin/edit.php2,128 ▲362.85 ▲0.8643.39 ▲7.6942.15 ▲9.17
Add New Post /wp-admin/post-new.php1,698 ▲17924.23 ▲1.22703.82 ▼5.4534.26 ▼30.65
Media Library /wp-admin/upload.php1,412 ▲245.45 ▲1.16105.64 ▼6.6887.02 ▲36.81

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method MyEventCalendar::mec_init() should not be called statically
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/myeventcalendar/classes.mec.php
    • > /wp-content/plugins/myeventcalendar/admin/mec-admin.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/myeventcalendar/admin/view/index.php:44

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)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #0, #0 in myeventcalendar/assets to your readme.txt
  • Screenshots: These screenshots require images: #1 (screenshot_1.png), #2 (screenshot_2.png)
  • Contributors: The plugin contributors field is missing
You can take inspiration from this readme.txt

myeventcalendar/myeventcalendar.php Passed 13 tests

The main file in "MyEventCalendar" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
130 characters long description:
Do you want to display your events on your site, then MyEventCalendar may be what you want. Add [myeventcalendar] to an empty page

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin19,494 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript62,9162,19510,364
CSS41,201148,838
PHP65336292

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity10.50
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/calendar.png0.61KB0.49KB▼ 19.71%