84% actblue-contributions

Code Review | ActBlue Contributions

WordPress plugin ActBlue Contributions scored84%from 54 tests.

About plugin

  • Plugin page: actblue-contribut...
  • Plugin version: 1.5.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.0
  • WordPress version: 6.3.1
  • First release: Dec 9, 2020
  • Latest release: Feb 22, 2023
  • Number of updates: 14
  • Update frequency: every 58.9 days
  • Top authors: actblue (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /6,704 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.95ms] Passed 4 tests

Analyzing server-side resources used by ActBlue Contributions
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.06 ▼2.30
Dashboard /wp-admin3.35 ▲0.0446.81 ▼3.08
Posts /wp-admin/edit.php3.46 ▲0.1052.45 ▲2.95
Add New Post /wp-admin/post-new.php5.93 ▲0.0486.24 ▼13.35
Media Library /wp-admin/upload.php3.27 ▲0.0436.97 ▲4.84

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

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

Browser metrics Passed 4 tests

ActBlue Contributions: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲5913.24 ▼1.328.77 ▲6.6037.72 ▼4.47
Dashboard /wp-admin2,221 ▲184.86 ▼0.13112.08 ▲4.0940.46 ▼2.46
Posts /wp-admin/edit.php2,100 ▼31.99 ▼0.0639.66 ▲2.2636.18 ▼2.08
Add New Post /wp-admin/post-new.php6,192 ▲4,66119.14 ▼4.11908.88 ▲278.7351.03 ▼0.15
Media Library /wp-admin/upload.php1,400 ▲34.23 ▲0.01105.79 ▲5.1744.07 ▲0.01

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% 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 50% 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 trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/actblue-contributions/admin/templates/actblue-settings-page.php:18

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 Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: fundraising, nonprofit, donation, contributions, giving...

actblue-contributions/actblue-contributions.php 85% from 13 tests

"ActBlue Contributions" version 1.5.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected1,297 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript231331751,076
PHP957393194
Sass24126
CSS1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity1.50
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.11
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1372.22%
▷ Protected methods00.00%
▷ Private methods527.78%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG files were detected