68% counters-integration

Code Review | Counters Integration

WordPress plugin Counters Integration scored 68% from 54 tests.

About plugin

  • Plugin page: counters-integration
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 30, 2015
  • Latest release: Sep 11, 2023
  • Number of updates: 17
  • Update frequency: every 169.0 days
  • Top authors: shra (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,096 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.94MB] [CPU: ▼33.88ms] Passed 4 tests

Analyzing server-side resources used by Counters Integration
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.88 ▼7.68
Dashboard /wp-admin3.01 ▼0.3029.22 ▼20.61
Posts /wp-admin/edit.php3.01 ▼0.3525.89 ▼23.55
Add New Post /wp-admin/post-new.php3.01 ▼2.8823.28 ▼81.56
Media Library /wp-admin/upload.php3.01 ▼0.2226.08 ▼9.79
Counters Integration /wp-admin/options-general.php?page=counters-integration/counters-integration.php3.0122.95

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Counters Integration
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.22 ▼1.391.59 ▼0.3141.55 ▼8.79
Dashboard /wp-admin2,207 ▲225.78 ▼0.1297.52 ▼2.9639.12 ▼3.34
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0145.03 ▲5.1936.94 ▲1.04
Add New Post /wp-admin/post-new.php1,549 ▲1623.27 ▼0.18660.00 ▼0.2949.99 ▼12.87
Media Library /wp-admin/upload.php1,392 ▲44.26 ▲0.0798.68 ▼12.4742.14 ▼3.37
Counters Integration /wp-admin/options-general.php?page=counters-integration/counters-integration.php8222.1523.3828.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=counters-integration/counters-integration.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=counters-integration/counters-integration.php
    • > Notice in wp-content/plugins/counters-integration/counters-integration.php+43
    Undefined index: action

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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_uninstall_hook() in wp-content/plugins/counters-integration/counters-integration.php:110

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (Settings panel with Counters Integration menu link.), #2 (Counters Integration settings page.)
The official readme.txt is a good inspiration

counters-integration/counters-integration.php 92% from 13 tests

The main PHP script in "Counters Integration" version 1.0.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 176 characters long)

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
Everything looks great! No dangerous files found in this plugin87 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1151887

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods342.86%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png22.32KB9.83KB▼ 55.95%
screenshot-2.png58.40KB22.81KB▼ 60.93%