84% counter-block

Code Review | Counter Block

WordPress plugin Counter Block scored84%from 54 tests.

About plugin

  • Plugin page: counter-block
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.2-5.8.0
  • WordPress version: 6.3.1
  • First release: Oct 1, 2020
  • Latest release: Aug 3, 2021
  • Number of updates: 7
  • Update frequency: every 43.7 days
  • Top authors: ibachal (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /5,094 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
Installer ran successfully

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

A check of server-side resources used by Counter Block
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0343.95 ▲0.99
Dashboard /wp-admin3.33 ▲0.0248.88 ▼4.08
Posts /wp-admin/edit.php3.38 ▲0.0248.96 ▼1.41
Add New Post /wp-admin/post-new.php7.17 ▲1.2892.92 ▼4.39
Media Library /wp-admin/upload.php3.25 ▲0.0238.94 ▼0.19

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Counter Block
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,874 ▲8813.41 ▼0.978.24 ▲6.1640.56 ▼1.04
Dashboard /wp-admin2,195 ▲185.54 ▼0.0888.67 ▲1.3039.78 ▼3.21
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0238.88 ▼1.0536.80 ▲0.55
Add New Post /wp-admin/post-new.php6,373 ▲4,84529.19 ▲6.09941.63 ▲282.0841.64 ▼26.11
Media Library /wp-admin/upload.php1,397 ▼04.26 ▲0.0498.45 ▼11.8548.09 ▲0.87

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

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 | 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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/counter-block/counter.php:76

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: numbers counter, stats, block, facts counter

counter-block/counter.php 85% from 13 tests

Analyzing the main PHP file in "Counter Block" version 1.0.0
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("counter-block.php" instead of "counter.php")

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
There were no executable files found in this plugin235 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript42618162
PHP271555
JSON10016
CSS2202

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin