84% buddyplug

Code Review | BuddyPlug

WordPress plugin BuddyPlug scored84%from 54 tests.

About plugin

  • Plugin page: buddyplug
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.1
  • WordPress version: 6.3.1
  • First release: Feb 12, 2013
  • Latest release: Dec 28, 2014
  • Number of updates: 12
  • Update frequency: every 57.0 days
  • Top authors: modemlooper (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

10+ active /5,678 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

An overview of server-side resources used by BuddyPlug
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.34 ▼3.02
Dashboard /wp-admin3.31 ▲0.0145.82 ▼1.96
Posts /wp-admin/edit.php3.36 ▲0.0052.58 ▲4.48
Add New Post /wp-admin/post-new.php5.90 ▲0.00100.16 ▼0.41
Media Library /wp-admin/upload.php3.24 ▲0.0040.52 ▲3.84

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by BuddyPlug
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.19 ▼0.842.05 ▲0.3544.94 ▼10.35
Dashboard /wp-admin2,206 ▲185.88 ▲0.98111.06 ▼1.1640.14 ▲1.30
Posts /wp-admin/edit.php2,092 ▼01.97 ▼0.0840.58 ▼5.4138.47 ▲1.87
Add New Post /wp-admin/post-new.php1,514 ▼1917.63 ▼5.40691.09 ▲32.6969.51 ▼3.76
Media Library /wp-admin/upload.php1,382 ▼34.20 ▼0.10112.71 ▲5.8144.74 ▼3.75

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddyplug/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 errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: buddypress, plugins

buddyplug/loader.php 92% from 13 tests

Analyzing the main PHP file in "BuddyPlug" version 0.3
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("buddyplug.php" instead of "loader.php")

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
Success! There were no dangerous files found in this plugin84 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2431584

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.66
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity6.00
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png76.92KB24.95KB▼ 67.57%