10% posts-to-events

Code Review | Posts To Events

WordPress plugin Posts To Events scored10%from 54 tests.

About plugin

  • Plugin page: posts-to-events
  • Plugin version: 1.56
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Apr 13, 2013
  • Latest release: May 19, 2013
  • Number of updates: 32
  • Update frequency: every 1.1 days
  • Top authors: xdark.eu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,696 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/posts-to-events/widget.php+287
    Function create_function() is deprecated

Server metrics [RAM: ▼2.07MB] [CPU: ▼59.17ms] Passed 4 tests

Analyzing server-side resources used by Posts To Events
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.19 ▼1.555.31 ▼38.38
Dashboard /wp-admin2.22 ▼1.355.54 ▼55.16
Posts /wp-admin/edit.php2.22 ▼1.465.58 ▼48.18
Add New Post /wp-admin/post-new.php2.22 ▼3.936.55 ▼94.95
Media Library /wp-admin/upload.php2.22 ▼1.276.99 ▼29.05

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Posts To Events
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6013.48 ▼0.801.64 ▼0.2446.30 ▲7.14
Dashboard /wp-admin2,225 ▲455.91 ▲0.2996.47 ▲8.3543.71 ▼0.52
Posts /wp-admin/edit.php2,135 ▲352.36 ▲0.3439.97 ▼1.4632.37 ▼3.47
Add New Post /wp-admin/post-new.php6,274 ▲4,73426.18 ▲2.92951.43 ▲284.6239.50 ▼14.26
Media Library /wp-admin/upload.php1,427 ▲274.56 ▲0.32102.62 ▲0.9248.13 ▲2.75

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/posts-to-events/widget.php+287
    Function create_function() is deprecated
  • Incomplete uninstall procedure, leaving 52 files (0.38MB) in the plugin directory
    • (new file) 1.56/inc/jquery-ui-1.10.2/css/excite-bike/images/ui-bg_highlight-soft_100_f9f9f9_1x100.png
    • (new file) 1.56/inc/jquery-ui-1.10.2/css/excite-bike/images/ui-bg_diagonals-thick_26_2293f7_40x40.png
    • (new file) 1.56/inc/jquery-ui-1.10.2/css/excite-bike/images/ui-bg_diagonals-thick_22_1484e6_40x40.png
    • (new file) 1.56/inc/jquery-ui-1.10.2/css/excite-bike/images/animated-overlay.gif
    • (new file) 1.56/inc/jquery-ui-1.10.2/css/excite-bike/images/ui-bg_inset-hard_100_eeeeee_1x100.png
    • (new file) 1.56/inc/jquery-ui-1.10.2/css/excite-bike/images/ui-icons_0a82eb_256x240.png
    • (new file) 1.56/inc/jquery-ui-1.10.2/css/excite-bike/images/ui-bg_diagonals-thick_20_e69700_40x40.png
    • (new file) 1.56/inc/jquery-ui-1.10.2/css/excite-bike/images/ui-bg_flat_0_e6b900_40x100.png
    • (new file) 1.56/inc/jquery-ui-1.10.2/css/excite-bike/images/ui-bg_flat_0_e69700_40x100.png
    • (new file) 1.56/inc/jquery-ui-1.10.2/css/excite-bike/images/ui-bg_diagonals-small_25_c5ddfc_40x40.png
    • ...
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • recovery_mode_email_last_sent
    • widget_recent-comments
    • widget_post_events_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/posts-to-events/uninstall.php
    • > /wp-content/plugins/posts-to-events/1.56/uninstall.php
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/posts-to-events/1.56/posts_to_events.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/posts-to-events/widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/posts-to-events/1.56/pte_admin.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/posts-to-events/1.56/widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/posts-to-events/posts_to_events.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/posts-to-events/pte_admin.php:7

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI found ("")
The official readme.txt might help

posts-to-events/posts_to_events.php 92% from 13 tests

The primary PHP file in "Posts To Events" version 1.56 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("posts-to-events.php" instead of "posts_to_events.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin2,447 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP61602321,337
CSS340521,110

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity134.50
▷ Minimum class complexity63.00
▷ Maximum class complexity206.00
Average method complexity7.85
▷ Minimum method complexity1.00
▷ Maximum method complexity65.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods78
▷ Static methods67.69%
▷ Public methods1823.08%
▷ Protected methods6076.92%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants92
▷ Global constants92100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
26 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
1.56/inc/jquery-ui-1.10.2/css/excite-bike/images/ui-bg_flat_0_e69700_40x100.png0.20KB0.08KB▼ 57.77%
inc/jquery-ui-1.10.2/css/excite-bike/images/ui-bg_diagonals-thick_22_1484e6_40x40.png0.40KB0.15KB▼ 62.10%
inc/jquery-ui-1.10.2/css/excite-bike/images/ui-bg_diagonals-thick_20_e69700_40x40.png0.41KB0.15KB▼ 62.35%
1.56/inc/jquery-ui-1.10.2/css/excite-bike/images/ui-bg_flat_0_e6b900_40x100.png0.20KB0.08KB▼ 57.77%
1.56/inc/jquery-ui-1.10.2/css/excite-bike/images/ui-icons_5fa5e3_256x240.png4.44KB4.17KB▼ 6.02%