10% buddypress-gifts-latest-2014

Code Review | Buddypress Gifts latest 2014

WordPress plugin Buddypress Gifts latest 2014 scored10%from 54 tests.

About plugin

  • Plugin page: buddypress-gifts-...
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: WP 3.3.1, BuddyPress 1.5.1+
  • WordPress version: 6.3.1
  • First release: Feb 7, 2014
  • Latest release: Apr 10, 2015
  • Number of updates: 59
  • Update frequency: every 7.2 days
  • Top authors: amitray (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /6,318 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function get_plugin_data was called with an argument that is deprecated since version 3.0.0! The Site Wide Only: true plugin header is deprecated. Use Network: true instead.

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

Server-side resources used by Buddypress Gifts latest 2014
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.80 ▼5.06
Dashboard /wp-admin3.31 ▲0.0050.69 ▼2.95
Posts /wp-admin/edit.php3.36 ▲0.0050.08 ▼3.17
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.19 ▼5.34
Media Library /wp-admin/upload.php3.23 ▲0.0037.92 ▼1.49

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 82 new files
Database: 1 new table, 6 new options
New tables
wp_bp_gifts
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Buddypress Gifts latest 2014
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.27 ▼0.411.79 ▼0.2643.07 ▼5.73
Dashboard /wp-admin2,195 ▲155.65 ▼0.0583.64 ▼14.7438.52 ▼7.37
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0237.69 ▼2.2737.87 ▲2.07
Add New Post /wp-admin/post-new.php1,545 ▲523.29 ▲4.77667.66 ▼4.8657.06 ▲4.26
Media Library /wp-admin/upload.php1,403 ▲64.21 ▲0.0095.86 ▼6.7847.06 ▼1.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5737
    Function get_plugin_data was called with an argument that is deprecated since version 3.0.0! The Site Wide Only: true plugin header is deprecated. Use Network: true instead.
  • Zombie tables detected upon uninstall: 1 table
    • wp_bp_gifts
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-gifts-latest-2014/includes/bp-gifts-cssjs.php:54
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/buddypress-gifts-latest-2014/includes/bp-gifts-filters.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-gifts-latest-2014/loader.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-gifts-latest-2014/includes/bp-gifts-notifications.php:109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/buddypress-gifts-latest-2014/includes/templates/gifts/screen_old.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-gifts-latest-2014/includes/bp-gifts-ajax.php:52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_textdomain() in wp-content/plugins/buddypress-gifts-latest-2014/includes/bp-gifts-core.php:45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/buddypress-gifts-latest-2014/includes/templates/gifts/screen.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Requires at least: Invalid plugin version format
  • Tested up to: Invalid plugin version format
You can take inspiration from this readme.txt

buddypress-gifts-latest-2014/loader.php 85% from 13 tests

"Buddypress Gifts latest 2014" version 1.7'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:
  • Main file name: The principal plugin file should be the same as the plugin slug ("buddypress-gifts-latest-2014.php" instead of "loader.php")
  • Requires at least: Required version number should use periods and dots only (ex. "7.0" instead of "WP 3.3.1, BuddyPress 1.5.1")

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 detected1,645 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP131,7186861,238
PO File15279167
CSS21240147
JavaScript6189184
XML1009

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity6.50
▷ Minimum class complexity6.00
▷ Maximum class complexity7.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions38
▷ Named functions38100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
49 PNG files occupy 0.44MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/hamberger.png8.30KB2.78KB▼ 66.48%
includes/images/rat.png8.89KB3.16KB▼ 64.46%
includes/images/beer.png7.43KB2.53KB▼ 65.92%
screenshot-1.png36.05KB11.16KB▼ 69.03%
includes/images/penguin.png6.49KB3.26KB▼ 49.78%