10% buddypress-easy-albums-photos-video-and-music-next-gen

Code Review | buddypress-easy-albums-photos-video-and-music-next-gen

WordPress plugin buddypress-easy-albums-photos-video-and-music-next-gen scored10%from 54 tests.

About plugin

  • Plugin page: buddypress-easy-a...
  • Plugin version: 1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2+
  • WordPress version: 6.3.1
  • First release: Jul 16, 2013
  • Latest release: Feb 3, 2016
  • Number of updates: 17
  • Update frequency: every 55.1 days
  • Top authors: orenshmu (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

40+ active /22,903 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin cannot be installed
    • > 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.02MB] [CPU: ▼5.75ms] Passed 4 tests

This is a short check of server-side resources used by buddypress-easy-albums-photos-video-and-music-next-gen
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.16 ▼0.31
Dashboard /wp-admin3.33 ▲0.0253.76 ▼2.58
Posts /wp-admin/edit.php3.38 ▲0.0249.36 ▼4.50
Add New Post /wp-admin/post-new.php5.91 ▲0.0294.12 ▼15.60
Media Library /wp-admin/upload.php3.25 ▲0.0238.15 ▼0.08

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 30 new files
Database: 1 new table, 6 new options
New tables
wp_bp_cp_galleries
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for buddypress-easy-albums-photos-video-and-music-next-gen
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.23 ▼0.121.83 ▲0.1240.79 ▼3.55
Dashboard /wp-admin2,195 ▲185.61 ▼0.0585.77 ▼3.9341.22 ▼8.29
Posts /wp-admin/edit.php2,103 ▲31.97 ▼0.0436.56 ▼4.0735.33 ▼2.69
Add New Post /wp-admin/post-new.php1,538 ▲1223.32 ▼0.42621.13 ▼95.0463.02 ▲4.00
Media Library /wp-admin/upload.php1,400 ▼34.27 ▲0.03104.80 ▼14.7144.42 ▼5.46

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall 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.
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_bp_cp_galleries
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
  • 11× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/buddypress-easy-albums-photos-video-and-music-next-gen/includes/templates/easyalbums/gallery.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_locale() in wp-content/plugins/buddypress-easy-albums-photos-video-and-music-next-gen/includes/bp-easyalbums-core.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_option() in wp-content/plugins/buddypress-easy-albums-photos-video-and-music-next-gen/includes/bp-easyalbums-admin.php:259
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-easy-albums-photos-video-and-music-next-gen/includes/bp-easyalbums-cssjs.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/buddypress-easy-albums-photos-video-and-music-next-gen/includes/templates/easyalbums/galleries.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/buddypress-easy-albums-photos-video-and-music-next-gen/includes/bp-easyalbums-cincopa.php:40
    • > PHP Notice
      Undefined index: hide_note in wp-content/plugins/buddypress-easy-albums-photos-video-and-music-next-gen/includes/bp-easyalbums-admin.php on line 255
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-easy-albums-photos-video-and-music-next-gen/includes/wp-media-cincopa.php:60
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/buddypress-easy-albums-photos-video-and-music-next-gen/includes/templates/easyalbums/create.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-easy-albums-photos-video-and-music-next-gen/loader.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 76% from 29 tests

readme.txt 69% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (Albums in the user profile page.), #2 (An album view in the user profile page), #3 (A Video posted to the activity stream by one of the site users.), #4 (The activity stream filled with user generated media posts.), #5 (The activity text box with the "easy albums" media publisher.)
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === buddypress-easy-albums-photos-video-and-music-next-gen === )
  • Tested up to: Version not formatted correctly
  • Tags: Please delete some tags, you are using 41 tag instead of maximum 10
  • Requires at least: Version not formatted correctly
You can look at the official readme.txt

buddypress-easy-albums-photos-video-and-music-next-gen/loader.php 85% from 13 tests

The main file in "buddypress-easy-albums-photos-video-and-music-next-gen" v. 1.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Plugin Name: Keep the plugin name shorter than 70 characters (currently 94 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("buddypress-easy-albums-photos-video-and-music-next-gen.php" instead of "loader.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected2,026 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP114091141,667
CSS2393254
PO File1424997
JavaScript1698

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.31
Average class complexity9.00
▷ Minimum class complexity2.00
▷ Maximum class complexity16.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions59
▷ Named functions59100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/blank_bt.png1.14KB1.38KB0.00%
includes/images/arrow.png0.20KB0.20KB▼ 4.31%
includes/images/galControlBG.png0.10KB0.08KB▼ 21.50%
includes/images/plus.png0.15KB0.12KB▼ 19.11%