78% past-events-extension

Code Review | Past Events Extension

WordPress plugin Past Events Extension scored 78% from 54 tests.

About plugin

  • Plugin page: past-events-exten...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8.2
  • WordPress version: 5.9.2
  • First release: Oct 23, 2017
  • Latest release: Nov 5, 2017
  • Number of updates: 5
  • Update frequency: every 3.4 days
  • Top authors: toddhalfpenny (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 541 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.98MB] [CPU: ▼311.32ms] Passed 4 tests

A check of server-side resources used by Past Events Extension
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.36 ▲1.8473.35 ▲20.47
Dashboard /wp-admin5.29 ▲1.8749.40 ▲14.04
Posts /wp-admin/edit.php5.53 ▲1.8997.77 ▲7.96
Add New Post /wp-admin/post-new.php5.29 ▼1.6941.30 ▼1,273.49
Media Library /wp-admin/upload.php5.29 ▲1.9935.32 ▲6.22
Freemius Debug [v.1.2.2.9] /wp-admin/admin.php?page=freemius5.2938.26

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 176 new files
Database: no new tables, 4 new options
New WordPress options
fs_active_plugins
fs_debug_mode
fs_accounts
fs_api_cache

Browser metrics Passed 4 tests

A check of browser resources used by Past Events Extension
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,857 ▲10315.79 ▲0.106.04 ▲0.012.92 ▲0.15
Dashboard /wp-admin2,949 ▲886.25 ▲0.07114.67 ▼23.32176.66 ▲13.27
Posts /wp-admin/edit.php2,719 ▲283.25 ▲0.0266.44 ▲3.80161.03 ▲13.98
Add New Post /wp-admin/post-new.php1,693 ▼6718.74 ▼2.83424.40 ▼17.83171.35 ▲14.32
Media Library /wp-admin/upload.php1,757 ▲595.57 ▲0.04143.08 ▼5.25209.55 ▲22.01
Freemius Debug [v.1.2.2.9] /wp-admin/admin.php?page=freemius1,4292.3857.81320.67

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 4 options in the database
    • fs_debug_mode
    • fs_accounts
    • fs_api_cache
    • fs_active_plugins

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/past-events-extension/freemius/templates/ajax-loader.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/past-events-extension/public/partials/template-past-session.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function pee_fs() in wp-content/plugins/past-events-extension/admin/partials/past-events-extension-admin-settings.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/past-events-extension/public/partials/past-sessions.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: conference, past, session, tyler, events

past-events-extension/past-events-extension.php Passed 13 tests

The main PHP file in "Past Events Extension" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
67 characters long description:
Adds "Past Events" support to sites running the Tyler events theme.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected25,951 lines of code in 142 files:
LanguageFilesBlank linesComment linesLines of code
PHP1004,27810,75018,584
PO File52,1402,1634,830
Sass20329762,091
JavaScript33459194
Markdown1610192
JSON10040
CSS120020

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 1,264)
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity44.27
▷ Minimum class complexity1.00
▷ Maximum class complexity1,264.00
Average method complexity3.55
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes45
▷ Abstract classes24.44%
▷ Concrete classes4395.56%
▷ Final classes00.00%
Methods796
▷ Static methods12816.08%
▷ Public methods60275.63%
▷ Protected methods141.76%
▷ Private methods18022.61%
Functions80
▷ Named functions80100.00%
▷ Anonymous functions00.00%
Constants104
▷ Global constants8581.73%
▷ Class constants1918.27%
▷ Public constants19100.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
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/past-events-extension.png9.16KB5.26KB▼ 42.58%