94% accept-button-for-membership-2

Code Review | Accept Button For Membership 2

WordPress plugin Accept Button For Membership 2 scored 94% from 54 tests.

About plugin

  • Plugin page: accept-button-for...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: May 6, 2016
  • Latest release: May 7, 2016
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: Elliotvs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 551 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼292.99ms] Passed 4 tests

Analyzing server-side resources used by Accept Button For Membership 2
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0154.77 ▲3.97
Dashboard /wp-admin3.41 ▲0.0033.73 ▲0.98
Posts /wp-admin/edit.php3.64 ▲0.0036.53 ▼0.50
Add New Post /wp-admin/post-new.php6.89 ▼0.0896.19 ▼1,167.89
Media Library /wp-admin/upload.php3.30 ▼0.0124.68 ▼4.53

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Accept Button For Membership 2: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4116.26 ▲0.275.93 ▼0.092.50 ▲0.16
Dashboard /wp-admin2,889 ▲286.12 ▼0.02117.56 ▼14.28152.93 ▼6.03
Posts /wp-admin/edit.php2,688 ▼03.23 ▼0.0261.45 ▼1.49135.94 ▼4.26
Add New Post /wp-admin/post-new.php1,668 ▲718.11 ▲1.73407.91 ▼17.65149.53 ▼2.98
Media Library /wp-admin/upload.php1,698 ▼05.54 ▼0.01139.11 ▲3.92184.75 ▼0.49

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
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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 fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/accept-button-for-membership-2/accept-button-for-membership-2.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Requires at least: The plugin version is formatted incorrectly
  • Tested up to: The plugin version is formatted incorrectly
The official readme.txt might help

accept-button-for-membership-2/accept-button-for-membership-2.php Passed 13 tests

The entry point to "Accept Button For Membership 2" version 1.0.0 is a PHP file that has certain tags in its header comment area
114 characters long description:
Adds a shortcode to hide the PayPal pay now button for Membership 2 plugin until user clicks an 'I ACCEPT' button.

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
No dangerous file extensions were detected25 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP111925

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
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
There were not PNG files found in your plugin