83% rally-pledge-button

Code Review | Rally Pledge Button

WordPress plugin Rally Pledge Button scored83%from 54 tests.

About plugin

  • Plugin page: rally-pledge-button
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5.1
  • WordPress version: 6.3.1
  • First release: Aug 6, 2013
  • Latest release: Aug 22, 2013
  • Number of updates: 8
  • Update frequency: every 2.6 days
  • Top authors: rally-dev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,135 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.09ms] Passed 4 tests

This is a short check of server-side resources used by Rally Pledge Button
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.53 ▼4.69
Dashboard /wp-admin3.33 ▲0.0345.89 ▼1.89
Posts /wp-admin/edit.php3.38 ▲0.0248.29 ▲1.79
Add New Post /wp-admin/post-new.php5.91 ▲0.0393.31 ▲3.65
Media Library /wp-admin/upload.php3.25 ▲0.0235.17 ▼3.56

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
rally-pledge-button/rally-pledge-button.php-db-version
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Rally Pledge Button: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.191.90 ▼0.1937.52 ▼13.49
Dashboard /wp-admin2,203 ▲184.87 ▼1.03108.45 ▲3.9945.77 ▼1.18
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0040.02 ▲1.3436.64 ▲0.87
Add New Post /wp-admin/post-new.php1,546 ▲3218.35 ▲0.82607.23 ▼53.3651.26 ▼10.05
Media Library /wp-admin/upload.php1,385 ▼04.25 ▲0.06102.14 ▲0.8240.76 ▼0.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • rally-pledge-button/rally-pledge-button.php-db-version
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

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 no errors were found, this is by no means 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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/rally-pledge-button/rally-pledge-button.php:61

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Tags: There were no tags found
  • Screenshots: Add images for these screenshots: #1 (While composing a post, simply click the Rally Pledge button in the post editor.), #2 (Designate where the money should go by entering the Rally URL of your choosing.), #3 (The Rally Pledge button shortcode will then be automatically generated and inserted into the post.), #4 (Publish your post, and the Rally Pledge button will be visible on your WordPress site.), #5 (Visitors to your WordPress site can now pledge money to the Rally of your choosing by simply entering their email address.)
Please take inspiration from this readme.txt

rally-pledge-button/rally-pledge-button.php 92% from 13 tests

The main file in "Rally Pledge Button" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin130 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14548102
JavaScript17028

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 1.67MB with 0.76MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png217.10KB96.55KB▼ 55.53%
image.png0.67KB0.94KB0.00%
screenshot-2.png293.53KB140.71KB▼ 52.06%
screenshot-5.png432.51KB154.92KB▼ 64.18%
screenshot-3.png278.92KB123.84KB▼ 55.60%