83% bp-admin-actions

Code Review | BP Admin Actions

WordPress plugin BP Admin Actions scored83%from 54 tests.

About plugin

  • Plugin page: bp-admin-actions
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 17, 2010
  • Latest release: Feb 23, 2015
  • Number of updates: 9
  • Update frequency: every 169.9 days
  • Top authors: slaFFik (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,172 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.43ms] Passed 4 tests

A check of server-side resources used by BP Admin Actions
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0235.30 ▼7.09
Dashboard /wp-admin3.33 ▲0.0244.14 ▼4.77
Posts /wp-admin/edit.php3.38 ▲0.0245.64 ▼1.23
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.34 ▼0.64
Media Library /wp-admin/upload.php3.25 ▲0.0236.11 ▲1.80

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

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

Browser metrics Passed 4 tests

A check of browser resources used by BP Admin Actions
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.39 ▼1.204.05 ▲2.0840.56 ▼4.27
Dashboard /wp-admin2,206 ▲185.90 ▲0.95108.43 ▼8.6342.63 ▼2.04
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0640.69 ▲4.0433.99 ▲1.95
Add New Post /wp-admin/post-new.php1,519 ▼1423.24 ▲0.14593.05 ▼64.3155.51 ▲7.77
Media Library /wp-admin/upload.php1,388 ▲64.23 ▲0.0499.29 ▼4.0141.80 ▲0.16

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/bp-admin-actions/bp-admin-actions.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-admin-actions/bp-admin-actions.php:22
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/bp-admin-actions/bp-admin-actions.php on line 12

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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Requires at least: Invalid version format
  • Tags: You are using too many tags: 11 tag instead of maximum 10
  • Tested up to: Invalid version format
You can take inspiration from this readme.txt

bp-admin-actions/bp-admin-actions.php 92% from 13 tests

The main PHP file in "BP Admin Actions" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains

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
Success! There were no dangerous files found in this plugin282 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PO File33330112
JavaScript18682
PHP1111282
CSS1006

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
PNG images were not found in this plugin