90% bp-directory-views

Code Review | BP Directory Views

WordPress plugin BP Directory Views scored90%from 54 tests.

About plugin

  • Plugin page: bp-directory-views
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-5.7
  • WordPress version: 6.3.1
  • First release: Feb 20, 2019
  • Latest release: Mar 18, 2021
  • Number of updates: 14
  • Update frequency: every 54.1 days
  • Top authors: Venutius (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,005 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.57ms] Passed 4 tests

An overview of server-side resources used by BP Directory Views
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.04 ▼3.87
Dashboard /wp-admin3.31 ▲0.0143.99 ▼2.40
Posts /wp-admin/edit.php3.36 ▲0.0148.53 ▲5.22
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.52 ▼9.16
Media Library /wp-admin/upload.php3.23 ▲0.0135.82 ▲1.16

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for BP Directory Views
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.67 ▼0.711.85 ▲0.0638.68 ▼4.36
Dashboard /wp-admin2,212 ▲204.84 ▼0.12106.33 ▼15.4939.39 ▼7.27
Posts /wp-admin/edit.php2,095 ▲272.06 ▼0.0140.62 ▲5.3536.94 ▲3.74
Add New Post /wp-admin/post-new.php1,520 ▼817.69 ▼0.46584.43 ▼61.6151.66 ▼10.36
Media Library /wp-admin/upload.php1,394 ▲64.18 ▼0.0599.75 ▼5.3242.02 ▼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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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 uses markdown syntax to describe your plugin to the world
5 plugin tags: groups, members, buddypress, grid, directory

bp-directory-views/bp-directory-views.php Passed 13 tests

The main PHP script in "BP Directory Views" version 1.0.3 is automatically included on every request by WordPress
70 characters long description:
Creates a uniform grid layout to the BP Members and Groups directories

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected827 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS46752504
JavaScript4128104233
PHP2241690

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin