84% accept-button-for-membership-2

Code Review | Accept Button For Membership 2

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

About plugin

  • Plugin page: accept-button-for...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • 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 /705 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.15ms] Passed 4 tests

Analyzing server-side resources used by Accept Button For Membership 2
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.68 ▲2.58
Dashboard /wp-admin3.31 ▲0.0148.75 ▼4.44
Posts /wp-admin/edit.php3.36 ▲0.0049.94 ▲0.90
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.27 ▼23.03
Media Library /wp-admin/upload.php3.23 ▲0.0036.38 ▼2.03

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Accept Button For Membership 2
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.24 ▼0.111.87 ▲0.1445.62 ▲1.36
Dashboard /wp-admin2,198 ▲215.62 ▼0.0686.92 ▼10.9538.89 ▼3.26
Posts /wp-admin/edit.php2,100 ▼01.97 ▲0.0134.79 ▼2.2236.15 ▲0.50
Add New Post /wp-admin/post-new.php1,536 ▲1018.15 ▼5.07621.90 ▼61.8873.34 ▲22.49
Media Library /wp-admin/upload.php1,403 ▲34.27 ▲0.0896.34 ▼11.1641.04 ▼5.16

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix 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 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 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tested up to: Invalid plugin version format
  • Requires at least: Invalid plugin version format
Please take inspiration from this readme.txt

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

Analyzing the main PHP file in "Accept Button For Membership 2" version 1.0.0
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
Good job! No executable or dangerous file extensions detected25 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP111925

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected