10% yy-events

Code Review | YY EVENTS

WordPress plugin YY EVENTS scored10%from 54 tests.

About plugin

  • Plugin page: yy-events
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.3.1
  • WordPress version: 6.3.1
  • First release: Feb 14, 2014
  • Latest release: Oct 12, 2015
  • Number of updates: 17
  • Update frequency: every 35.6 days
  • Top authors: YYengine (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,473 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/yy-events/yy-events.php+371
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼51.75ms] Passed 4 tests

Server-side resources used by YY EVENTS
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.435.31 ▼38.84
Dashboard /wp-admin2.05 ▼1.266.63 ▼41.13
Posts /wp-admin/edit.php2.05 ▼1.317.31 ▼39.32
Add New Post /wp-admin/post-new.php2.05 ▼3.846.65 ▼87.69
Media Library /wp-admin/upload.php2.05 ▼1.185.74 ▼29.18
YYEvents /wp-admin/edit.php?post_type=yyevents2.056.02
Add New /wp-admin/post-new.php?post_type=yyevents2.058.00

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_yye_event_widget
db_upgraded

Browser metrics Passed 4 tests

YY EVENTS: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲11013.79 ▼0.591.79 ▲0.0845.55 ▼2.14
Dashboard /wp-admin2,246 ▲584.92 ▼0.12110.81 ▲6.2843.41 ▲1.37
Posts /wp-admin/edit.php2,129 ▲402.23 ▲0.1940.99 ▲7.3637.76 ▲3.35
Add New Post /wp-admin/post-new.php1,565 ▲3223.12 ▲0.10606.85 ▼60.4854.76 ▼5.82
Media Library /wp-admin/upload.php1,431 ▲494.28 ▲0.0195.77 ▼4.3145.43 ▲1.66
YYEvents /wp-admin/edit.php?post_type=yyevents1,0932.0433.5729.70
Add New /wp-admin/post-new.php?post_type=yyevents2,3717.82171.1070.57

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/yy-events/yy-events.php+371
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_yye_event_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=yyevents
    • > Deprecated in wp-content/plugins/yy-events/yy-events.php+371
    Function create_function() is deprecated
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=yyevents
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in yye_event_widget is deprecated since version 4.3.0! Use __construct() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=yyevents
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WPAlchemy_MetaBox::_global_head() should not be called statically
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=yyevents
    • > Deprecated in wp-content/plugins/yy-events/wpalchemy/MetaBox.php+1516
    Non-static method WPAlchemy_MetaBox::_is_post() should not be called statically
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=yyevents
    • > Deprecated in wp-content/plugins/yy-events/wpalchemy/MetaBox.php+986
    Non-static method WPAlchemy_MetaBox::_is_post_or_page() should not be called statically
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=yyevents
    • > Deprecated in wp-content/plugins/yy-events/wpalchemy/MetaBox.php+1024
    Non-static method WPAlchemy_MetaBox::_get_current_post_type() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=yyevents
    • > Deprecated in wp-content/plugins/yy-events/wpalchemy/MetaBox.php+1516
    Non-static method WPAlchemy_MetaBox::_is_page() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=yyevents
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WPAlchemy_MetaBox::_global_foot() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=yyevents
    • > Deprecated in wp-content/plugins/yy-events/wpalchemy/MetaBox.php+1061
    Non-static method WPAlchemy_MetaBox::_get_post_id() should not be called statically

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 25× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WPAlchemy_MetaBox' not found in wp-content/plugins/yy-events/metaboxes/select-spec.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function the_field() on null in wp-content/plugins/yy-events/metaboxes/checkbox-meta.php:9
    • > PHP Warning
      include_once(ABSPATHwp-content/plugins/yy-events/wpalchemy/MetaBox.php): failed to open stream: No such file or directory in wp-content/plugins/yy-events/metaboxes/setup.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WPAlchemy_MediaAccess' not found in wp-content/plugins/yy-events/metaboxes/setup.php:5
    • > PHP Notice
      Undefined variable: mb in wp-content/plugins/yy-events/metaboxes/radio-meta.php on line 9
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/yy-events/metaboxes/setup.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to a member function the_field() on null in wp-content/plugins/yy-events/metaboxes/simple-meta.php:8
    • > PHP Fatal error
      Uncaught Error: Call to a member function the_name() on null in wp-content/plugins/yy-events/metaboxes/full-meta.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/yy-events/yy-events.php:16
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/yy-events/metaboxes/setup.php on line 4

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/post-new.php?post_type=yyevents
    • > Network (severe)
    wp-content/plugins/yy-events/metaboxes/images/ui-bg_flat_75_ffffff_40x100.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === yy-events === )
The official readme.txt might help

yy-events/yy-events.php Passed 13 tests

The entry point to "YY EVENTS" version 1.4 is a PHP file that has certain tags in its header comment area
76 characters long description:
Enables you to show a list of Events, Concerts, Sports and Theater Listings.

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
There were no executable files found in this plugin2,768 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP156191,0012,168
CSS38066551
PO File1161649

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity87.67
▷ Minimum class complexity8.00
▷ Maximum class complexity237.00
Average method complexity4.66
▷ Minimum method complexity1.00
▷ Maximum method complexity68.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods71
▷ Static methods00.00%
▷ Public methods7098.59%
▷ Protected methods00.00%
▷ Private methods11.41%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants18100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.28MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png31.88KB15.04KB▼ 52.81%
assets/screenshot-1.png24.36KB11.55KB▼ 52.56%
assets/screenshot-5.png62.14KB27.28KB▼ 56.10%
assets/screenshot-2.png27.88KB13.23KB▼ 52.56%
assets/screenshot-4.png139.39KB48.62KB▼ 65.12%