89% tag-cloud-widget

Code Review | Tag Cloud Widget

WordPress plugin Tag Cloud Widget scored89%from 54 tests.

About plugin

  • Plugin page: tag-cloud-widget
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.4
  • WordPress version: 6.3.1
  • First release: Nov 27, 2015
  • Latest release: Nov 28, 2015
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: Waterloo Plugins (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /7,244 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
Install script ran successfully

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

A check of server-side resources used by Tag Cloud Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.50 ▲2.63
Dashboard /wp-admin3.32 ▲0.0246.81 ▼5.67
Posts /wp-admin/edit.php3.37 ▲0.0142.56 ▼4.10
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.38 ▼11.44
Media Library /wp-admin/upload.php3.24 ▲0.0137.34 ▲4.93

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Tag Cloud Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,894 ▲15913.66 ▼0.966.28 ▲4.5746.62 ▼0.89
Dashboard /wp-admin2,207 ▲194.89 ▼1.07113.46 ▼1.6242.98 ▼3.41
Posts /wp-admin/edit.php2,096 ▲72.16 ▲0.1434.22 ▼2.5031.56 ▼2.62
Add New Post /wp-admin/post-new.php1,518 ▼1523.16 ▼0.23653.70 ▼25.1860.76 ▲4.54
Media Library /wp-admin/upload.php1,392 ▲44.22 ▼0.0595.87 ▼12.1242.78 ▼3.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Sample tag cloud), #2 (Widget options)
The official readme.txt is a good inspiration

tag-cloud-widget/tag-cloud.php 92% from 13 tests

The main PHP script in "Tag Cloud Widget" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("tag-cloud-widget.php" instead of "tag-cloud.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin64 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP110852
JavaScript11711
CSS1071

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.20
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.12MB with 0.09MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png42.13KB11.26KB▼ 73.27%
screenshot-1.png80.13KB21.32KB▼ 73.40%