84% trendcounter

Code Review | trendcounter - Analytics and Counter for WordPress

WordPress plugin trendcounter - Analytics and Counter for WordPress scored84%from 54 tests.

About plugin

  • Plugin page: trendcounter
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.9.1
  • WordPress version: 6.3.1
  • First release: Nov 30, 2011
  • Latest release: Jan 26, 2018
  • Number of updates: 28
  • Update frequency: every 80.3 days
  • Top authors: trendcounter (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /8,708 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
This plugin's installer ran successfully

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

Server-side resources used by trendcounter - Analytics and Counter for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0344.70 ▲2.69
Dashboard /wp-admin3.32 ▲0.0248.78 ▲1.79
Posts /wp-admin/edit.php3.37 ▲0.0148.03 ▲4.34
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.47 ▼8.56
Media Library /wp-admin/upload.php3.24 ▲0.0138.48 ▲3.65
trendcounter /wp-admin/options-general.php?page=trendcounter/trendcounter.php3.2129.51

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

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

Browser metrics Passed 4 tests

A check of browser resources used by trendcounter - Analytics and Counter for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.31 ▼1.091.87 ▲0.0844.09 ▼8.04
Dashboard /wp-admin2,212 ▲245.83 ▼0.0695.49 ▼17.6039.74 ▼8.43
Posts /wp-admin/edit.php2,095 ▲32.01 ▲0.0140.51 ▲3.9134.33 ▲0.29
Add New Post /wp-admin/post-new.php1,519 ▼1417.72 ▼5.59678.88 ▲9.2969.02 ▲14.65
Media Library /wp-admin/upload.php1,391 ▲34.31 ▲0.16102.87 ▲9.6839.65 ▼6.57
trendcounter /wp-admin/options-general.php?page=trendcounter/trendcounter.php9292.0525.8733.27

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/trendcounter/trendcounter.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 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: analytics, counter, statistics, trendcounter, besucherzhler...

trendcounter/trendcounter.php Passed 13 tests

Analyzing the main PHP file in "trendcounter - Analytics and Counter for WordPress" version 1.0
65 characters long description:
See in real-time what is happening on your blog with trendcounter

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 plugin334 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP19839306
CSS16028

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity19.00
▷ Minimum class complexity3.00
▷ Maximum class complexity35.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-32x32.png0.89KB1.25KB0.00%
assets/installation.png21.66KB8.72KB▼ 59.72%