72% simple-terms-and-conditions-for-buddypress

Code Review | BuddyPress Simple Terms And Conditions

WordPress plugin BuddyPress Simple Terms And Conditions scored72%from 54 tests.

About plugin

  • Plugin page: simple-terms-and-...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: WordPress 4.4, BuddyPress 2.4.3-4.5.3
  • WordPress version: 6.3.1
  • First release: Feb 3, 2016
  • Latest release: Jun 25, 2016
  • Number of updates: 11
  • Update frequency: every 13.1 days
  • Top authors: fmai (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

400+ active /10,022 total downloads

Benchmarks

Plugin footprint 83% from 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: ▼7.28MB] [CPU: ▼1,493,685.81ms] Passed 4 tests

A check of server-side resources used by BuddyPress Simple Terms And Conditions
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▼29.1844.41 ▼5,974,746.20
Dashboard /wp-admin3.37 ▲0.0254.75 ▼0.65
Posts /wp-admin/edit.php3.49 ▲0.0953.89 ▲1.11
Add New Post /wp-admin/post-new.php5.95 ▲0.0295.78 ▲2.52
Media Library /wp-admin/upload.php3.30 ▲0.0237.40 ▲4.47
Simple Terms and Conditions /wp-admin/options-general.php?page=bp-tandc3.2732.85

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 11 new options
New WordPress options
can_compress_scripts
tandc_headline
tandc_style
widget_recent-posts
tandc_checkboxtext
widget_recent-comments
widget_theysaidso_widget
tandc_error
db_upgraded
tandc_description
...

Browser metrics Passed 4 tests

Checking browser requirements for BuddyPress Simple Terms And Conditions
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲2214.27 ▼0.081.68 ▼0.5042.89 ▼2.60
Dashboard /wp-admin2,199 ▲195.53 ▼0.1489.58 ▼3.4041.24 ▲1.53
Posts /wp-admin/edit.php2,104 ▲42.04 ▲0.0539.52 ▲0.4539.27 ▲5.39
Add New Post /wp-admin/post-new.php1,539 ▲1318.22 ▼4.62675.76 ▼20.1276.30 ▲20.83
Media Library /wp-admin/upload.php1,398 ▼54.20 ▲0.0298.61 ▲0.0645.69 ▼0.75
Simple Terms and Conditions /wp-admin/options-general.php?page=bp-tandc8532.0122.9324.64

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 11 options
    • tandc_error
    • tandc_style
    • tandc_headline
    • can_compress_scripts
    • tandc_checkboxtext
    • widget_theysaidso_widget
    • widget_recent-posts
    • tandc_description
    • theysaidso_admin_options
    • widget_recent-comments
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=bp-tandc
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=bp-tandc
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

SRP 0% 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× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/simple-terms-and-conditions-for-buddypress/bp-simple-terms-and-conditions.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/simple-terms-and-conditions-for-buddypress/tandc-options-template.php:2

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 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Donate link: Please fix this invalid url: ""
Please take inspiration from this readme.txt

simple-terms-and-conditions-for-buddypress/bp-simple-terms-and-conditions.php 77% from 13 tests

"BuddyPress Simple Terms And Conditions" version 1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Requires at least: Required version number should use periods and dots only (ex. "7.0" instead of "WordPress 4.4, BuddyPress 2.4.3")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-terms-and-conditions-for-buddypress.php" instead of "bp-simple-terms-and-conditions.php")

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
Good job! No executable or dangerous file extensions detected127 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2111682
PO File1111145

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.04
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png14.73KB7.38KB▼ 49.91%
assets/screenshot-2.png47.38KB19.11KB▼ 59.66%