66% bemocalendar

Code Review | BEMO Calendar

WordPress plugin BEMO Calendar scored 66% from 54 tests.

About plugin

  • Plugin page: bemocalendar
  • Plugin version: 0.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 6.3.1
  • First release: Sep 2, 2014
  • Latest release: Sep 3, 2014
  • Number of updates: 5
  • Update frequency: every 5.4 days
  • Top authors: bemoore (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 849 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.30MB] [CPU: ▼15.34ms] Passed 4 tests

This is a short check of server-side resources used by BEMO Calendar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.4041.41 ▲0.22
Dashboard /wp-admin3.72 ▲0.4246.59 ▲0.70
Posts /wp-admin/edit.php3.77 ▲0.4246.55 ▼0.22
Add New Post /wp-admin/post-new.php3.51 ▼2.3838.00 ▼62.05
Media Library /wp-admin/upload.php3.58 ▲0.3638.83 ▲6.33
Events /wp-admin/edit.php?post_type=bemocalendar_events3.6335.25
Add New /wp-admin/post-new.php?post_type=bemocalendar_events3.5034.31
Categories /wp-admin/edit-tags.php?taxonomy=bemocalendar_eventcategory&post_type=bemocalendar_events3.5836.17

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 54 new files
Database: no new tables, 9 new options
New WordPress options
db_upgraded
widget_bemocalendar_widget
widget_theysaidso_widget
widget_bemocalendar_widget_small
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_bemocalendar_widget_eventslist

Browser metrics Passed 4 tests

Checking browser requirements for BEMO Calendar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲10913.18 ▼1.431.71 ▼0.0442.49 ▼4.43
Dashboard /wp-admin2,251 ▲605.90 ▲1.0099.13 ▼2.4477.05 ▲33.44
Posts /wp-admin/edit.php2,131 ▲452.01 ▼0.0136.92 ▼1.3331.31 ▼4.59
Add New Post /wp-admin/post-new.php1,703 ▲16922.61 ▼0.53673.98 ▲8.8047.72 ▼6.70
Media Library /wp-admin/upload.php1,432 ▲444.21 ▲0.0397.63 ▼2.7563.75 ▲19.52
Events /wp-admin/edit.php?post_type=bemocalendar_events1,1291.9633.8330.02
Add New /wp-admin/post-new.php?post_type=bemocalendar_events2,4577.99184.00119.58
Categories /wp-admin/edit-tags.php?taxonomy=bemocalendar_eventcategory&post_type=bemocalendar_events1,3352.2436.0629.77

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_bemocalendar_widget_eventslist
    • widget_bemocalendar_widget
    • widget_recent-comments
    • widget_bemocalendar_widget_small
    • widget_recent-posts
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/post-new.php?post_type=bemocalendar_events
    • > Notice in wp-content/plugins/bemocalendar/bemocalendar.php+320
    Undefined index: bemocalendar-events-nonce
    • > GET request to /wp-admin/post-new.php?post_type=bemocalendar_events
    • > Notice in wp-content/plugins/bemocalendar/bemocalendar.php+321
    Trying to get property 'ID' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=bemocalendar_events
    • > Notice in wp-content/plugins/bemocalendar/bemocalendar.php+252
    Undefined index: bemocalendar_events_startdate
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=bemocalendar_events
    • > Notice in wp-content/plugins/bemocalendar/bemocalendar.php+254
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/post-new.php?post_type=bemocalendar_events
    • > Notice in wp-content/plugins/bemocalendar/bemocalendar.php+253
    Undefined index: bemocalendar_events_enddate
    • > GET request to /wp-admin/post-new.php?post_type=bemocalendar_events
    • > Notice in wp-content/plugins/bemocalendar/bemocalendar.php+254
    Undefined index: bemocalendar_events_allday

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
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/bemocalendar/json_categories.php
    • > /wp-content/plugins/bemocalendar/json.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bemocalendar/class.BEMOCalendarWidget.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/bemocalendar/bemocalendar_event_category_taxonomy.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bemocalendar/class.BEMOCalendarWidgetEventsList.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bemocalendar/class.BEMOCalendarWidget.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bemocalendar/class.BEMOCalendarWidgetSmall.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=bemocalendar_eventcategory&post_type=bemocalendar_events
    • > Network (severe)
    http://f145/ - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/edit-tags.php?taxonomy=bemocalendar_eventcategory&post_type=bemocalendar_events
    • > Deprecation (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=6.3.1 1 Listener added for a synchronous 'DOMSubtreeModified' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.
    • > GET request to /wp-admin/edit-tags.php?taxonomy=bemocalendar_eventcategory&post_type=bemocalendar_events
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/bemocalendar/js/tax-meta-clss.js:269:22)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/edit-tags.php?taxonomy=bemocalendar_eventcategory&post_type=bemocalendar_events
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #3, #4, #5, #6, #7, #8 in bemocalendar/assets to your readme.txt
You can take inspiration from this readme.txt

bemocalendar/bemocalendar.php Passed 13 tests

This is the main PHP file of "BEMO Calendar" version 0.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
66 characters long description:
A jQuery Calendar plugin because I couldn't find anything suitable

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
There were no executable files found in this plugin10,856 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript101,5709386,366
CSS53251122,014
PHP103979621,568
PO File22760908

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity36.17
▷ Minimum class complexity2.00
▷ Maximum class complexity200.00
Average method complexity3.22
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods95
▷ Static methods00.00%
▷ Public methods95100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
23 PNG files occupy 0.25MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ui-bg_diagonals-thick_20_666666_40x40.png0.30KB0.15KB▼ 49.68%
images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
(invalid) images/add.png26.18KB0.00KB▼ 100.00%
images/ui-bg_highlight-soft_75_ffe45c_1x100.png0.32KB0.18KB▼ 42.38%
images/pro-version-small-widget.png9.72KB4.83KB▼ 50.31%