89% buddypress-instaban

Code Review | BuddyPress Instaban

WordPress plugin BuddyPress Instaban scored89%from 54 tests.

About plugin

  • Plugin page: buddypress-instaban
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 20, 2013
  • Latest release: Jun 20, 2013
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: billz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,188 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: ▼4.07ms] Passed 4 tests

An overview of server-side resources used by BuddyPress Instaban
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.89 ▼3.02
Dashboard /wp-admin3.31 ▲0.0149.85 ▼1.02
Posts /wp-admin/edit.php3.36 ▲0.0149.74 ▼3.89
Add New Post /wp-admin/post-new.php5.89 ▲0.0194.54 ▼8.35
Media Library /wp-admin/upload.php3.24 ▲0.0137.05 ▲2.81

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

BuddyPress Instaban: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.24 ▼1.312.33 ▲0.3241.76 ▼4.08
Dashboard /wp-admin2,206 ▲185.91 ▲0.01100.78 ▼10.1338.90 ▼5.33
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0440.10 ▲2.4735.36 ▲0.55
Add New Post /wp-admin/post-new.php1,533 ▲523.17 ▲0.10649.90 ▼5.9753.58 ▼1.35
Media Library /wp-admin/upload.php1,388 ▼04.23 ▲0.0699.66 ▼3.2643.94 ▼3.05

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% 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:
  • Tested up to: Version not formatted correctly
  • Requires at least: Version not formatted correctly
  • Screenshots: Screenshot #1 (Screenshot of a member profile with the Instaban button.) image required
You can take inspiration from this readme.txt

buddypress-instaban/loader.php 92% from 13 tests

The main PHP file in "BuddyPress Instaban" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("buddypress-instaban.php" instead of "loader.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin255 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP569133197
JavaScript117258

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
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%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png25.91KB11.24KB▼ 56.62%