73% localendar-for-wordpress

Code Review | Localendar Calendar for WordPress

WordPress plugin Localendar Calendar for WordPress scored73%from 54 tests.

About plugin

  • Plugin page: localendar-for-wo...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-5.1
  • WordPress version: 6.3.1
  • First release: May 20, 2012
  • Latest release: Feb 14, 2019
  • Number of updates: 67
  • Update frequency: every 36.8 days
  • Top authors: localendar (97.01%)griffinjt (4.48%)

Code review

54 tests

User reviews

19 reviews

Install metrics

700+ active /77,617 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.55MB] [CPU: ▼51.14ms] Passed 4 tests

Server-side resources used by Localendar Calendar for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.45 ▼1.029.45 ▼34.34
Dashboard /wp-admin2.46 ▼0.8512.24 ▼42.47
Posts /wp-admin/edit.php2.46 ▼0.9012.58 ▼38.76
Add New Post /wp-admin/post-new.php2.46 ▼3.4312.20 ▼88.97
Media Library /wp-admin/upload.php2.46 ▼0.7712.99 ▼27.37

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
widget_localendar
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Localendar Calendar for WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,868 ▲10713.48 ▼0.767.97 ▲5.9142.43 ▲2.49
Dashboard /wp-admin2,195 ▲245.63 ▲0.0890.91 ▼5.4938.15 ▼3.79
Posts /wp-admin/edit.php2,100 ▼31.98 ▼0.0141.73 ▲6.2536.55 ▼6.35
Add New Post /wp-admin/post-new.php1,794 ▲26823.27 ▼0.02674.42 ▼25.7858.43 ▼5.88
Media Library /wp-admin/upload.php1,400 ▲34.14 ▼0.1196.25 ▼9.4743.64 ▼2.90

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in TGM_Localendar_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_localendar
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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 fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action_ref_array() in wp-content/plugins/localendar-for-wordpress/localendar.php:61

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 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Donate link: Please fix this invalid url: ""
  • Screenshots: Add images for these screenshots: #1 (A simple month-block calendar view. See our [Examples](http://www.localendar.com/calendar/online-calendar-samples) page for more styles.), #2 (The mini calendar widget with pop-up event balloons.), #3 (Our Pinboard "flow-style" view. Just one of over 45 ways to publish your calendar), #4 (Use our theme editor to customize your calendar without using CSS (CSS hooks also available)), #5 (There are three different calendar styles used on this sample page), #6 (A highly customized calendar created by a teacher for her students), #7 (Import/Export for a variety of calendar systems), #8 (Manage your events through your localendar account with our powerful Event Editor), #9 (Another customized month calendar, with different event colors, background color, and arrows), #10 (The "Today+Happening Soon" calendar widget. You can customize the text, colors, and look-ahead period.), #11 (The "Today+Happening Soon" calendar widget, with Day/Date information across the top of the calendar)
You can look at the official readme.txt

localendar-for-wordpress/localendar.php 92% from 13 tests

The entry point to "Localendar Calendar for WordPress" version 1.4 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("localendar-for-wordpress.php" instead of "localendar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected799 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1105170684
JavaScript1246115

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity62.50
▷ Minimum class complexity30.00
▷ Maximum class complexity95.00
Average method complexity9.79
▷ Minimum method complexity1.00
▷ Maximum method complexity74.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
12 PNG files occupy 0.98MB with 0.66MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-7.png41.63KB13.52KB▼ 67.53%
screenshot-6.png238.57KB71.73KB▼ 69.93%
screenshot-8.png93.35KB29.10KB▼ 68.83%
screenshot-5.png111.57KB35.74KB▼ 67.97%
screenshot-1.png153.18KB53.81KB▼ 64.87%