77% wp-event-calender

Code Review | WP Event Calender

WordPress plugin WP Event Calender scored77%from 54 tests.

About plugin

  • Plugin page: wp-event-calender
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0.1
  • WordPress version: 6.3.1
  • First release: Oct 14, 2015
  • Latest release: Feb 20, 2017
  • Number of updates: 14
  • Update frequency: every 35.4 days
  • Top authors: Sohelwpexpert (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /10,280 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
Installer ran successfully

Server metrics [RAM: ▼0.67MB] [CPU: ▼17.19ms] Passed 4 tests

This is a short check of server-side resources used by WP Event Calender
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0552.16 ▼5.86
Dashboard /wp-admin3.34 ▲0.0347.49 ▼4.01
Posts /wp-admin/edit.php3.39 ▲0.0351.93 ▲0.11
Add New Post /wp-admin/post-new.php3.12 ▼2.7637.24 ▼59.01
Media Library /wp-admin/upload.php3.26 ▲0.0339.34 ▲1.80
Events Category /wp-admin/edit-tags.php?taxonomy=events_cat&post_type=event-calender3.2639.08
Events /wp-admin/edit.php?post_type=event-calender3.3036.57
Add New /wp-admin/post-new.php?post_type=event-calender3.1234.27

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Event Calender
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲17113.79 ▼0.708.10 ▲6.2138.99 ▼7.81
Dashboard /wp-admin2,226 ▲465.56 ▼0.1091.62 ▲0.9939.58 ▲3.08
Posts /wp-admin/edit.php2,131 ▲342.15 ▲0.1932.65 ▼2.5838.17 ▲2.70
Add New Post /wp-admin/post-new.php1,552 ▲2623.64 ▲0.69702.34 ▲59.5762.80 ▲12.14
Media Library /wp-admin/upload.php1,431 ▲344.23 ▼0.0694.88 ▼10.5644.78 ▼3.34
Events Category /wp-admin/edit-tags.php?taxonomy=events_cat&post_type=event-calender1,3022.1229.7532.18
Events /wp-admin/edit.php?post_type=event-calender1,1121.9034.4428.36
Add New /wp-admin/post-new.php?post_type=event-calender2,4467.63170.8968.39

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/post-new.php?post_type=event-calender
    • > Notice in wp-content/plugins/wp-event-calender/plugin-hook.php+566
    Undefined index: pro_eventcalender_meta_box_nonce

SRP 50% 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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-event-calender/plugin-hook.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wp-event-calender/plugin-hook.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (WP Event Calender in a post.)
  • Donate link: Invalid url: ""
Please take inspiration from this readme.txt

wp-event-calender/plugin-hook.php 85% from 13 tests

"WP Event Calender" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-event-calender.php" instead of "plugin-hook.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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 detected899 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP114256399
CSS1526225
JavaScript18429212
PO File1224263

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/img/nav_black.png0.82KB0.51KB▼ 37.80%
css/img/date_icon.png0.42KB0.60KB0.00%
css/img/nav.png0.45KB0.42KB▼ 5.04%