84% buddypress-cover-photo

Code Review | BuddyPress Default Cover Photo

WordPress plugin BuddyPress Default Cover Photo scored84%from 54 tests.

About plugin

  • Plugin page: buddypress-cover-...
  • Plugin version: 1.6.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.3.2
  • WordPress version: 6.3.1
  • First release: Feb 18, 2015
  • Latest release: Dec 20, 2019
  • Number of updates: 106
  • Update frequency: every 16.7 days
  • Top authors: seventhqueen (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

1,000+ active /100,669 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.32ms] Passed 4 tests

A check of server-side resources used by BuddyPress Default Cover Photo
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0443.06 ▲0.09
Dashboard /wp-admin57.91 ▲54.5611,271,050.30 ▲11,270,997.13
Posts /wp-admin/edit.php3.51 ▲0.1049.19 ▼9.19
Add New Post /wp-admin/post-new.php5.97 ▲0.0492.07 ▼17.76
Media Library /wp-admin/upload.php3.31 ▲0.0440.78 ▲1.60

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by BuddyPress Default Cover Photo
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.10 ▼0.512.19 ▲0.3145.25 ▲2.24
Dashboard /wp-admin2,198 ▲215.58 ▼0.0793.74 ▲1.3041.41 ▼1.13
Posts /wp-admin/edit.php2,103 ▼02.01 ▲0.0034.79 ▼8.1134.79 ▼2.07
Add New Post /wp-admin/post-new.php1,526 ▼023.63 ▼0.12698.31 ▲27.7761.23 ▲1.74
Media Library /wp-admin/upload.php1,400 ▼04.13 ▼0.0998.06 ▼0.5544.50 ▼0.56

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

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)
Even though no errors were found, 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 take a closer look at the following
  • 1× 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-cover-photo/buddypress-cover-photo.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: buddypress, profile cover, default cover, groups, avatar...

buddypress-cover-photo/buddypress-cover-photo.php Passed 13 tests

The main PHP file in "BuddyPress Default Cover Photo" ver. 1.6.0 adds more information about the plugin and also serves as the entry point for this plugin
61 characters long description:
Define default Cover photo to BuddyPress Profiles and Groups.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin940 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP3265192696
PO File36071200
JavaScript18644

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity27.00
▷ Minimum class complexity8.00
▷ Maximum class complexity39.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods28
▷ Static methods414.29%
▷ Public methods28100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.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
There were not PNG files found in your plugin