84% blt-counter

Code Review | BLT Counter

WordPress plugin BLT Counter scored84%from 54 tests.

About plugin

  • Plugin page: blt-counter
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.6
  • WordPress version: 6.3.1
  • First release: Aug 6, 2013
  • Latest release: Aug 11, 2013
  • Number of updates: 11
  • Update frequency: every 0.5 days
  • Top authors: shoshirasaka (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /921 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

Analyzing server-side resources used by BLT Counter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.16 ▲0.62
Dashboard /wp-admin3.32 ▲0.0146.06 ▼1.19
Posts /wp-admin/edit.php3.37 ▲0.0147.20 ▼2.24
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.74 ▼4.97
Media Library /wp-admin/upload.php3.24 ▲0.0135.04 ▲2.85
BLT Counter /wp-admin/options-general.php?page=blt_counter3.2130.46

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by BLT Counter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.21 ▼1.181.99 ▲0.0740.35 ▼9.37
Dashboard /wp-admin2,213 ▲224.84 ▼0.0596.77 ▼7.4438.24 ▼5.51
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0341.80 ▼0.9936.59 ▲1.41
Add New Post /wp-admin/post-new.php1,545 ▲2518.54 ▼4.37597.75 ▼75.6948.56 ▼6.03
Media Library /wp-admin/upload.php1,395 ▲74.17 ▼0.0694.26 ▼10.5741.97 ▼1.13
BLT Counter /wp-admin/options-general.php?page=blt_counter7582.0523.0626.34

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/blt-counter/blt-counter.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (The admin page) image missing
Please take inspiration from this readme.txt

blt-counter/blt-counter.php Passed 13 tests

The primary PHP file in "BLT Counter" version 1.6 is used by WordPress to initiate all plugin functionality
45 characters long description:
Show total value influence of SNS at anywhere

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin80 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1121052
PO File13328

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.32
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%
Functions3
▷ Named functions3100.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.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png14.09KB6.39KB▼ 54.62%