94% actblue-contributions

Code Review | ActBlue Contributions

WordPress plugin ActBlue Contributions scored 94% from 54 tests.

About plugin

  • Plugin page: actblue-contribut...
  • Plugin version: 1.4.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.7
  • WordPress version: 5.9.2
  • First release: Dec 9, 2020
  • Latest release: Mar 11, 2021
  • Number of updates: 10
  • Update frequency: every 11.1 days
  • Top authors: actblue (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 1,152 total downloads

Benchmarks

Plugin footprint Passed 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.01MB] [CPU: ▼313.79ms] Passed 4 tests

A check of server-side resources used by ActBlue Contributions
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0254.69 ▲5.41
Dashboard /wp-admin3.42 ▲0.0233.21 ▲0.59
Posts /wp-admin/edit.php3.65 ▲0.0136.42 ▼0.05
Add New Post /wp-admin/post-new.php6.89 ▼0.0893.03 ▼1,255.22
Media Library /wp-admin/upload.php3.30 ▲0.0122.90 ▼0.49

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 38 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for ActBlue Contributions
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,801 ▲4715.97 ▲0.0610.27 ▲3.872.61 ▲0.05
Dashboard /wp-admin2,895 ▲376.18 ▼0.02116.25 ▼26.10156.42 ▼12.94
Posts /wp-admin/edit.php2,688 ▼63.25 ▲0.0162.33 ▲0.42139.62 ▼4.08
Add New Post /wp-admin/post-new.php1,665 ▲416.86 ▲1.31400.48 ▼23.61155.13 ▼2.08
Media Library /wp-admin/upload.php1,698 ▼05.55 ▲0.04140.62 ▼1.74186.10 ▼2.68

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > 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 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 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
8 plugin tags: nonprofit, donation, giving, donate, contribute...

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

The principal PHP file in "ActBlue Contributions" v. 1.4.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,291 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript241331751,077
PHP955376187
Sass24126
CSS1101

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity1.25
▷ Minimum class complexity1.00
▷ Maximum class complexity2.00
Average method complexity1.06
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1270.59%
▷ Protected methods00.00%
▷ Private methods529.41%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected