72% bf3-infobox

Code Review | BF3 Infobox

WordPress plugin BF3 Infobox scored72%from 54 tests.

About plugin

  • Plugin page: bf3-infobox
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: Apr 1, 2013
  • Latest release: Apr 2, 2013
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: Calaelen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,487 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.89ms] Passed 4 tests

This is a short check of server-side resources used by BF3 Infobox
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0540.93 ▼3.09
Dashboard /wp-admin3.37 ▲0.0245.38 ▼19.24
Posts /wp-admin/edit.php3.48 ▲0.1250.37 ▲2.80
Add New Post /wp-admin/post-new.php5.95 ▲0.0684.81 ▼4.03
Media Library /wp-admin/upload.php3.29 ▲0.0637.59 ▲5.43
Battlefield 3 Info /wp-admin/options-general.php?page=bf3infobox-options3.2330.95

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 363 new files
Database: no new tables, 8 new options
New WordPress options
bf3infobox_settings
theysaidso_admin_options
widget_bf3infobox
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

BF3 Infobox: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.35 ▼0.961.68 ▼0.4542.50 ▲0.79
Dashboard /wp-admin2,204 ▲165.81 ▲0.89103.42 ▼12.8139.22 ▼3.93
Posts /wp-admin/edit.php2,093 ▲42.02 ▼0.0334.98 ▼2.8430.35 ▼5.06
Add New Post /wp-admin/post-new.php1,536 ▲323.23 ▼0.13633.10 ▼3.0753.23 ▼2.22
Media Library /wp-admin/upload.php1,392 ▲14.20 ▼0.0195.24 ▼1.2440.42 ▼7.27
Battlefield 3 Info /wp-admin/options-general.php?page=bf3infobox-options8062.0624.4226.78

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 8 options
    • theysaidso_admin_options
    • widget_recent-posts
    • bf3infobox_settings
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_bf3infobox

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=bf3infobox-options
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method bf3infobox_options::display_options_page() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=bf3infobox-options
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=bf3infobox-options
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 0% 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
Almost there! Just fix the following items
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/bf3-infobox/views/index.php
    • > /wp-content/plugins/bf3-infobox/bf3infobox.php
    • > /wp-content/plugins/bf3-infobox/inc/index.php
    • > /wp-content/plugins/bf3-infobox/languages/index.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bf3-infobox/inc/bf3infobox-widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 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: statistics, battlefield, bf3, widget, bf4...

bf3-infobox/bf3infobox.php 77% from 13 tests

"BF3 Infobox" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 176 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bf3-infobox.php" instead of "bf3infobox.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin585 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP78477377
PO File25188141
Markdown116036
CSS19431

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity6.67
▷ Minimum class complexity3.00
▷ Maximum class complexity11.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods17
▷ Static methods211.76%
▷ Public methods1694.12%
▷ Protected methods15.88%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
346 PNG files occupy 2.94MB with 1.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/misc/Mp_Engineer_Sc_Engineer.png0.75KB0.63KB▼ 15.42%
img/rankstiny/ss41.png2.00KB1.04KB▼ 48.37%
img/misc/Mp_Ace_Squad_ASQ_Ribbons.png1.44KB1.55KB0.00%
img/rankstiny/r34.png1.83KB0.80KB▼ 56.23%
img/rankstiny/ss43.png1.97KB1.00KB▼ 49.45%