84% yapsody-events-calendar

Code Review | Yapsody Events Calendar

WordPress plugin Yapsody Events Calendar scored84%from 54 tests.

About plugin

  • Plugin page: yapsody-events-ca...
  • Plugin version: 3.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.7
  • WordPress version: 6.3.1
  • First release: Aug 10, 2018
  • Latest release: Mar 24, 2021
  • Number of updates: 1
  • Update frequency: every 365.0 days

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /857 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.21ms] Passed 4 tests

Server-side resources used by Yapsody Events Calendar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.67 ▼7.75
Dashboard /wp-admin3.32 ▲0.0249.18 ▼1.72
Posts /wp-admin/edit.php3.37 ▲0.0249.58 ▼5.00
Add New Post /wp-admin/post-new.php5.90 ▲0.0286.82 ▼10.35
Media Library /wp-admin/upload.php3.24 ▲0.0235.93 ▲0.21
Yapsody Events Calendar /wp-admin/options-general.php?page=yapsody-events-calendar3.2233.79

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 954 new files
Database: no new tables, 20 new options
New WordPress options
yapevents_timeFormat
yapevents_theme
yapevents_limit_txt
yapevents_version
yapevents_defaultView
yapevents_qtips_style
widget_theysaidso_widget
yapevents_available_views
db_upgraded
widget_recent-posts
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Yapsody Events Calendar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,954 ▲20814.56 ▼0.1320.05 ▲18.1144.54 ▲1.22
Dashboard /wp-admin2,229 ▲445.14 ▼0.86104.53 ▼10.3744.72 ▼1.06
Posts /wp-admin/edit.php2,114 ▲252.33 ▲0.3539.34 ▼3.8636.35 ▼3.40
Add New Post /wp-admin/post-new.php1,538 ▲1623.10 ▼0.05646.28 ▼16.8235.27 ▼22.72
Media Library /wp-admin/upload.php1,408 ▲204.43 ▲0.1098.67 ▼7.1543.09 ▼2.23
Yapsody Events Calendar /wp-admin/options-general.php?page=yapsody-events-calendar1,4172.4149.7447.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 20 options
    • yapevents_qtips
    • yapevents_timeFormat
    • yapevents_defaultView
    • theysaidso_admin_options
    • widget_recent-comments
    • yapevents_qtips_style
    • yapevents_qtips_my
    • yapevents_qtips_at
    • yapevents_theme
    • yapevents_theme_css
    • ...

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
Good news, no errors were detected

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
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/yapsody-events-calendar/yapevents-admin.php:210
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_option() in wp-content/plugins/yapsody-events-calendar/yapevents-install.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yapsody-events-calendar/yapsody-events.php:291
    • > PHP Warning
      Use of undefined constant YAPEVENTS_VERSION - assumed 'YAPEVENTS_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/yapsody-events-calendar/yapevents-admin.php on line 210

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
8 plugin tags: yapsody, calendar, yapsody events, ajax calendar, events calendar...

yapsody-events-calendar/yapsody-events.php 92% from 13 tests

The primary PHP file in "Yapsody Events Calendar" version 3.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("yapsody-events-calendar.php" instead of "yapsody-events.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin77,912 lines of code in 208 files:
LanguageFilesBlank linesComment linesLines of code
CSS1462,1893,96671,614
JavaScript53372705,026
PO File6321373787
PHP310180485

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity27.50
▷ Minimum class complexity22.00
▷ Maximum class complexity33.00
Average method complexity6.30
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods10100.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
706 PNG files occupy 1.84MB with 0.73MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/css/jquery-ui-1.10.4/start/images/ui-bg_gloss-wave_50_6eac2c_500x100.png5.82KB2.13KB▼ 63.33%
includes/css/jquery-ui-1.10.4/trontastic/images/ui-icons_ffffff_256x240.png6.20KB4.20KB▼ 32.23%
includes/css/jquery-ui-1.10.4/cupertino/images/ui-icons_2694e8_256x240.png4.49KB4.20KB▼ 6.46%
includes/css/jquery-ui-1.10.4/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png0.26KB0.11KB▼ 56.06%
includes/css/jquery-ui-1.10.4/trontastic/images/ui-bg_glass_60_000000_1x400.png0.30KB0.18KB▼ 40.45%