78% l-events-calendar

Code Review | L Events Calendar

WordPress plugin L Events Calendar scored78%from 54 tests.

About plugin

  • Plugin page: l-events-calendar
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.3
  • WordPress version: 6.3.1
  • First release: Sep 8, 2015
  • Latest release: Sep 8, 2015
  • Number of updates: 13
  • Update frequency: N/A
  • Top authors: Loi Truong (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,426 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.10MB] [CPU: ▲6.14ms] Passed 4 tests

A check of server-side resources used by L Events Calendar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0947.53 ▲0.53
Dashboard /wp-admin3.42 ▲0.1262.57 ▲9.33
Posts /wp-admin/edit.php3.51 ▲0.1664.11 ▲11.56
Add New Post /wp-admin/post-new.php6.00 ▲0.11102.61 ▲3.13
Media Library /wp-admin/upload.php3.32 ▲0.0951.82 ▲11.74
All L-Events /wp-admin/edit.php?post_type=l-event3.3753.07
Settings /wp-admin/edit.php?post_type=l-event&page=lec-settings3.2938.01
Event Category /wp-admin/edit-tags.php?taxonomy=event-category&post_type=l-event3.4052.74
Add New /wp-admin/post-new.php?post_type=l-event3.5255.52

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 52 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

L Events Calendar: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,137 ▲37615.88 ▲1.4814.31 ▲12.1643.52 ▼3.28
Dashboard /wp-admin2,428 ▲2256.74 ▲0.86131.47 ▲27.6940.91 ▼5.94
Posts /wp-admin/edit.php2,337 ▲2343.62 ▲1.5953.82 ▲14.4136.43 ▼1.17
Add New Post /wp-admin/post-new.php1,743 ▲21122.58 ▼0.74646.51 ▲2.1936.11 ▼19.35
Media Library /wp-admin/upload.php1,480 ▲804.44 ▲0.2296.60 ▼14.7846.55 ▼2.31
All L-Events /wp-admin/edit.php?post_type=l-event1,3213.6361.4631.58
Settings /wp-admin/edit.php?post_type=l-event&page=lec-settings1,1073.3655.7328.37
Event Category /wp-admin/edit-tags.php?taxonomy=event-category&post_type=l-event1,5173.6543.6829.74
Add New /wp-admin/post-new.php?post_type=l-event2,5378.01186.3368.12

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=l-event&page=lec-settings
    • > Notice in wp-content/plugins/l-events-calendar/core/option-page.php+52
    Trying to access array offset on value of type bool
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=l-event
    • > Warning in wp-content/plugins/l-events-calendar/core/l-events-custom-fields.php+113
    A non-numeric value encountered

SRP 50% 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 take a closer look at the following
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/l-events-calendar/core/l-events-custom-fields.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/l-events-calendar/core/option-page.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/l-events-calendar/core/shortcode.php:114
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/l-events-calendar/core/initial-post-type.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/l-events-calendar/core/calendar-api.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/l-events-calendar/core/custom-media-button.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Donate link: Please fix this invalid URI: "paypal.me/LTruong"
The official readme.txt might help

l-events-calendar/l-events-calendar.php Passed 13 tests

The primary PHP file in "L Events Calendar" version 1.0.1 is used by WordPress to initiate all plugin functionality
72 characters long description:
A beautiful responsive calendar. Manage events with ease and simplicity.

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
Good job! No executable or dangerous file extensions detected1,646 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP767121603
Sass2619564
JavaScript54863454
JSON10011
Markdown17011
CSS3173

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity6.00
▷ Minimum class complexity3.00
▷ Maximum class complexity9.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
15 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/admin/images/ui-bg_glass_40_0078a3_1x400.png0.33KB0.16KB▼ 52.05%
img/binder.png0.42KB0.43KB0.00%
css/admin/images/ui-bg_glass_40_ffc73d_1x400.png0.31KB0.16KB▼ 49.37%
css/admin/images/ui-bg_highlight-soft_80_eeeeee_1x100.png0.27KB0.13KB▼ 51.45%
css/admin/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%