10% tag-counter

Code Review | Tag counter

WordPress plugin Tag counter scored10%from 54 tests.

About plugin

  • Plugin page: tag-counter
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.1.1
  • WordPress version: 6.3.1
  • First release: Nov 13, 2014
  • Latest release: Mar 23, 2015
  • Number of updates: 4
  • Update frequency: every 32.5 days
  • Top authors: tomek00 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /911 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/tag-counter/tags.php+19
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_Widget_Tags_Count has a deprecated constructor

Server metrics [RAM: ▼1.71MB] [CPU: ▼48.49ms] Passed 4 tests

An overview of server-side resources used by Tag counter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.1816.58 ▼25.26
Dashboard /wp-admin2.30 ▼1.0011.39 ▼41.91
Posts /wp-admin/edit.php2.30 ▼1.0511.15 ▼39.25
Add New Post /wp-admin/post-new.php2.30 ▼3.5810.59 ▼85.20
Media Library /wp-admin/upload.php2.30 ▼0.9310.61 ▼27.58

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_tags-count-widget
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Tag counter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.30 ▼1.001.80 ▼0.0642.92 ▼0.10
Dashboard /wp-admin2,206 ▲214.85 ▼1.00115.31 ▲7.4642.09 ▲0.88
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0535.34 ▼4.9834.74 ▼2.72
Add New Post /wp-admin/post-new.php1,533 ▲1223.07 ▼0.21638.24 ▼23.6263.18 ▼1.70
Media Library /wp-admin/upload.php1,385 ▼34.20 ▼0.0198.53 ▼23.5346.55 ▼2.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in WP_Widget_Tags_Count is deprecated since version 4.3.0! Use __construct() instead.
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_tags-count-widget
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tag-counter/tags.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: counter, tags, count, tag, widget

tag-counter/tags.php 92% from 13 tests

"Tag counter" version 0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("tag-counter.php" instead of "tags.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected60 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP18838
PO File13422

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected