10% wp-event-schedule

Code Review | WP Event Schedule

WordPress plugin WP Event Schedule scored10%from 54 tests.

About plugin

  • Plugin page: wp-event-schedule
  • Plugin version: 0.9.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.6
  • WordPress version: 6.3.1
  • First release: Sep 21, 2013
  • Latest release: Dec 7, 2015
  • Number of updates: 8
  • Update frequency: every 102.0 days
  • Top authors: ryo-nosuke (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,694 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/wp-event-schedule/wp-event-schedule.php+19
    date_default_timezone_set(): Timezone ID '' is invalid

Server metrics [RAM: ▼1.92MB] [CPU: ▼54.97ms] Passed 4 tests

A check of server-side resources used by WP Event Schedule
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.34 ▼38.71
Dashboard /wp-admin2.10 ▼1.256.27 ▼53.00
Posts /wp-admin/edit.php2.10 ▼1.266.36 ▼43.08
Add New Post /wp-admin/post-new.php2.10 ▼3.795.31 ▼85.09
Media Library /wp-admin/upload.php2.10 ▼1.135.85 ▼26.88
イベント /wp-admin/edit.php?post_type=wpes2.105.92
カテゴリー /wp-admin/edit-tags.php?taxonomy=wpes_category&post_type=wpes2.106.44
新規追加 /wp-admin/post-new.php?post_type=wpes2.105.70

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 70 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_wpeccalendarwidget
widget_wpestodaywidget
wpes_version

Browser metrics Passed 4 tests

An overview of browser requirements for WP Event Schedule
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,860 ▲11413.20 ▼1.171.91 ▲0.1440.98 ▼3.69
Dashboard /wp-admin2,236 ▲514.93 ▼0.9198.43 ▼2.1890.47 ▲51.01
Posts /wp-admin/edit.php2,096 ▲72.01 ▼0.0038.81 ▼3.3344.39 ▲9.78
Add New Post /wp-admin/post-new.php1,695 ▲17621.20 ▼1.96765.69 ▲129.7959.10 ▲10.49
Media Library /wp-admin/upload.php1,418 ▲304.21 ▼0.0395.43 ▼2.3082.84 ▲37.81
イベント /wp-admin/edit.php?post_type=wpes1,1062.4235.9251.72
カテゴリー /wp-admin/edit-tags.php?taxonomy=wpes_category&post_type=wpes1,2952.1426.7942.58
新規追加 /wp-admin/post-new.php?post_type=wpes2,3537.90165.69149.06

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/wp-event-schedule/wp-event-schedule.php+19
    date_default_timezone_set(): Timezone ID '' is invalid
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • can_compress_scripts
    • widget_wpestodaywidget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_wpeccalendarwidget
    • widget_theysaidso_widget

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
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wpes
    • > Notice in wp-content/plugins/wp-event-schedule/wp-event-schedule.php+19
    date_default_timezone_set(): Timezone ID '' is invalid
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wpes
    • > Deprecated in wp-content/plugins/wp-event-schedule/widgets/wpes-widget-today.php+4
    Methods with the same name as their class will not be constructors in a future version of PHP; WpesTodayWidget has a deprecated constructor
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wpes
    • > Deprecated in wp-content/plugins/wp-event-schedule/widgets/wpes-widget-calendar.php+4
    Methods with the same name as their class will not be constructors in a future version of PHP; WpecCalendarWidget has a deprecated constructor
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wpes
    • > Deprecated in wp-content/plugins/wp-event-schedule/widgets/wpes-widget.php+12
    Function create_function() is deprecated
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wpes
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in WpesTodayWidget is deprecated since version 4.3.0! Use __construct() instead.
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wpes
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in WpecCalendarWidget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/post-new.php?post_type=wpes
    • > Notice in wp-content/plugins/wp-event-schedule/wpes-admin.class.php+80
    Undefined variable: events_nonce
    • > GET request to /wp-admin/post-new.php?post_type=wpes
    • > Notice in wp-content/plugins/wp-event-schedule/wpes-admin.class.php+47
    Undefined index: event_start_date
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wpes
    • > Notice in wp-content/plugins/wp-event-schedule/wpes-admin.class.php+52
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/post-new.php?post_type=wpes
    • > Notice in wp-content/plugins/wp-event-schedule/wpes-admin.class.php+52
    Undefined index: event_end_date

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WPES\\Output' not found in wp-content/plugins/wp-event-schedule/trunk/wpes-shortcode.class.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WPES\\Output' not found in wp-content/plugins/wp-event-schedule/wpes-shortcode.class.php:4

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Create event.), #2 (Display calendar to WordPress.), #3 (Calendar widget.)
The official readme.txt might help

wp-event-schedule/wp-event-schedule.php 85% from 13 tests

The principal PHP file in "WP Event Schedule" v. 0.9.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path folder was not found ("/lang/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected2,672 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript22022891,718
PHP10143197852
CSS3147102

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity10.00
▷ Minimum class complexity2.00
▷ Maximum class complexity30.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods102
▷ Static methods1211.76%
▷ Public methods9492.16%
▷ Protected methods87.84%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants00.00%
▷ Class constants18100.00%
▷ Public constants18100.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
34 PNG files occupy 0.33MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/smoothness/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%
css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png0.20KB0.08KB▼ 58.17%
trunk/css/smoothness/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%
trunk/css/smoothness/images/ui-icons_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%
css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png0.26KB0.15KB▼ 42.37%