67% files-addon-for-event-espresso-4

Code Review | Files Addon for Event Espresso 4

WordPress plugin Files Addon for Event Espresso 4 scored67%from 54 tests.

About plugin

  • Plugin page: files-addon-for-e...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 4, 2016
  • Latest release: Apr 18, 2023
  • Number of updates: 41
  • Update frequency: every 60.5 days
  • Top authors: wordgenie (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

70+ active /2,992 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.90ms] Passed 4 tests

A check of server-side resources used by Files Addon for Event Espresso 4
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.31 ▼1.99
Dashboard /wp-admin3.31 ▲0.0050.60 ▼7.14
Posts /wp-admin/edit.php3.36 ▲0.0049.12 ▼0.20
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.60 ▼2.25
Media Library /wp-admin/upload.php3.23 ▲0.0038.64 ▲2.87

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: 1 new table, 7 new options
New tables
wp_esp_question_allowed_ext
New WordPress options
widget_recent-posts
file_db_created
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Files Addon for Event Espresso 4
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.25 ▼0.361.78 ▲0.1341.20 ▼0.32
Dashboard /wp-admin2,198 ▲245.70 ▲0.1489.03 ▼1.8539.42 ▼0.06
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0033.91 ▼2.4434.39 ▲1.14
Add New Post /wp-admin/post-new.php1,528 ▲223.05 ▼0.35677.58 ▲38.0353.97 ▲0.16
Media Library /wp-admin/upload.php1,391 ▼94.24 ▲0.0497.67 ▼13.0444.98 ▼2.96

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_esp_question_allowed_ext
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • file_db_created
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/files-addon-for-event-espresso-4/EE_File_Config.php
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'EE_Form_Input_Base' not found in wp-content/plugins/files-addon-for-event-espresso-4/EE_SSA_FILE.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/files-addon-for-event-espresso-4/eea-file.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/files-addon-for-event-espresso-4/ssa_run_filters.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'EE_Validation_Strategy_Base' not found in wp-content/plugins/files-addon-for-event-espresso-4/EE_FILE_Validation_Strategy.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'EE_Display_Strategy_Base' not found in wp-content/plugins/files-addon-for-event-espresso-4/EE_File_Display_Strategy.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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:
  • Requires at least: Invalid version format
  • Tested up to: Invalid version format
The official readme.txt is a good inspiration

files-addon-for-event-espresso-4/eea-file.php 85% from 13 tests

Analyzing the main PHP file in "Files Addon for Event Espresso 4" version 1.2.1
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 154 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("files-addon-for-event-espresso-4.php" instead of "eea-file.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
Good job! No executable or dangerous file extensions detected491 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP77757364
JavaScript215395
CSS23032

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.21
Average class complexity4.60
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods9
▷ Static methods333.33%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/close.png0.32KB0.24KB▼ 25.54%