73% wp-action-network

Code Review | Action Network

WordPress plugin Action Network scored 73% from 54 tests.

About plugin

  • Plugin page: wp-action-network
  • Plugin version: 1.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.7.2
  • WordPress version: 5.8.1
  • First release: Jun 29, 2017
  • Latest release: Jun 27, 2021
  • Number of updates: 28
  • Update frequency: every 52.1 days
  • Top authors: concertedaction (57.14%)jonathankissam (46.43%)

Code review

54 tests

User reviews

2 reviews

Install metrics

600+ active / 6,652 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.58MB] [CPU: ▼139.31ms] Passed 4 tests

Server-side resources used by Action Network
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.39 ▲0.6739.09 ▲16.88
Dashboard /wp-admin3.68 ▲0.6250.38 ▲4.32
Posts /wp-admin/edit.php3.72 ▲0.6248.27 ▲8.28
Add New Post /wp-admin/post-new.php5.97 ▲0.5492.27 ▼563.75
Media Library /wp-admin/upload.php3.56 ▲0.5531.81 ▼6.07

Server storage [IO: ▲0.22MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 20 new files
Database: 3 new tables, 8 new options
New tables
wp_actionnetwork_cron_log
wp_actionnetwork_queue
wp_actionnetwork
New WordPress options
widget_actionnetwork_calendar_widget
widget_actionnetwork_signupwidget
actionnetwork_api_key
widget_actionnetwork_list_widget
actionnetwork_version
actionnetwork_db_version
actionnetwork_queue_status
widget_actionnetwork_action_widget

Browser metrics Passed 4 tests

Checking browser requirements for Action Network
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,738 ▲14215.98 ▲0.418.25 ▼1.5150.41 ▲3.78
Dashboard /wp-admin2,980 ▲495.91 ▼0.01134.77 ▼7.34134.68 ▲29.07
Posts /wp-admin/edit.php2,771 ▲322.68 ▲0.0162.22 ▼6.1691.45 ▲0.04
Add New Post /wp-admin/post-new.php1,522 ▲2216.90 ▼1.69365.02 ▼4.39141.07 ▲28.92
Media Library /wp-admin/upload.php1,767 ▼435.01 ▼0.01140.06 ▼6.39137.86 ▲12.48

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_actionnetwork_cron_log
  • Zombie WordPress options detected upon uninstall: 4 options
    • widget_actionnetwork_calendar_widget
    • widget_actionnetwork_list_widget
    • widget_actionnetwork_signupwidget
    • widget_actionnetwork_action_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-action-network/includes/actionnetwork-action-list.class.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-action-network/actionnetwork.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'ActionNetwork' not found in wp-content/plugins/wp-action-network/includes/actionnetwork-sync.class.php:3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/wp-action-network/includes/actionnetwork-action-list.class.php on line 7
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-action-network/includes/actionnetwork-action-list.class.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-action-network/includes/actionnetwork-widgets.class.php:4

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 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: signup, online organizing, events, action network

wp-action-network/actionnetwork.php 77% from 13 tests

The main file in "Action Network" v. 1.4.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-action-network.php" instead of "actionnetwork.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin3,466 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP65934393,108
JavaScript64325277
CSS313681

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity36.89
▷ Minimum class complexity10.00
▷ Maximum class complexity79.00
Average method complexity5.19
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods77
▷ Static methods11.30%
▷ Public methods7597.40%
▷ Protected methods11.30%
▷ Private methods11.30%
Functions28
▷ Named functions2796.43%
▷ Anonymous functions13.57%
Constants0
▷ Global constants00.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
logo-action-network.png3.11KB2.76KB▼ 11.12%
icon-action-network.png0.76KB0.94KB0.00%