62% 2d-tag-cloud-widget-by-sujin

Code Review | 2D Tag Cloud

WordPress plugin 2D Tag Cloud scored62%from 54 tests.

About plugin

  • Plugin page: 2d-tag-cloud-widg...
  • Plugin version: 6.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.4
  • WordPress version: 6.3.1
  • First release: Jan 5, 2013
  • Latest release: Dec 22, 2015
  • Number of updates: 93
  • Update frequency: every 11.6 days
  • Top authors: sujin2f (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

200+ active /10,990 total downloads

Benchmarks

Plugin footprint 65% 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.01MB] [CPU: ▼9.50ms] Passed 4 tests

This is a short check of server-side resources used by 2D Tag Cloud
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.16 ▼0.72
Dashboard /wp-admin3.33 ▼0.0247.58 ▼9.63
Posts /wp-admin/edit.php3.38 ▲0.0243.64 ▼8.11
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.99 ▼19.48
Media Library /wp-admin/upload.php3.25 ▲0.0236.49 ▼0.76
2D Tag Cloud /wp-admin/options-general.php?page=sujin-2d-tag-cloud3.2935.09

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 47 new files
Database: 1 new table, 9 new options
New tables
wp_terms_hit
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
SJ_2DTAG_CONFIG
SJ_2DTAG_version
widget_tag_cloud_widget_sujin
can_compress_scripts

Browser metrics Passed 4 tests

2D Tag Cloud: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.34 ▲0.171.85 ▲0.2139.45 ▼7.32
Dashboard /wp-admin2,202 ▲285.63 ▼0.0085.06 ▼8.3037.64 ▼1.93
Posts /wp-admin/edit.php2,104 ▲42.00 ▼0.0435.48 ▼1.0532.42 ▼3.64
Add New Post /wp-admin/post-new.php1,531 ▲523.16 ▲0.09590.69 ▼39.2465.79 ▲12.11
Media Library /wp-admin/upload.php1,407 ▲104.18 ▼0.03106.24 ▲2.6442.18 ▲1.04
2D Tag Cloud /wp-admin/options-general.php?page=sujin-2d-tag-cloud3,0864.28200.69446.15

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_terms_hit
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • widget_tag_cloud_widget_sujin
    • widget_recent-comments
    • SJ_2DTAG_version
    • SJ_2DTAG_CONFIG
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 25% 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 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/2d-tag-cloud-widget-by-sujin/views/admin-tabs.php
    • > /wp-content/plugins/2d-tag-cloud-widget-by-sujin/views/metabox-shortcode.php
    • > /wp-content/plugins/2d-tag-cloud-widget-by-sujin/views/metabox-preview.php
    • > /wp-content/plugins/2d-tag-cloud-widget-by-sujin/views/metabox-donation.php
  • 19× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: set in wp-content/plugins/2d-tag-cloud-widget-by-sujin/views/admin-under-3.4.php on line 13
    • > PHP Notice
      Undefined variable: option in wp-content/plugins/2d-tag-cloud-widget-by-sujin/views/metabox-colors.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/2d-tag-cloud-widget-by-sujin/views/admin.php:9
    • > PHP Warning
      include_once(): Failed opening 'SJ_2DTAG_VIEW_DIR/admin-tabs.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/2d-tag-cloud-widget-by-sujin/views/admin-under-3.4.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_url() in wp-content/plugins/2d-tag-cloud-widget-by-sujin/views/metabox-publish.php:4
    • > PHP Notice
      Undefined variable: set in wp-content/plugins/2d-tag-cloud-widget-by-sujin/views/admin.php on line 7
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/2d-tag-cloud-widget-by-sujin/views/metabox-colors.php on line 5
    • > PHP Warning
      include_once(): Failed opening 'SJ_2DTAG_VIEW_DIR/admin-tabs.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/2d-tag-cloud-widget-by-sujin/views/admin.php on line 2
    • > PHP Notice
      Undefined variable: set in wp-content/plugins/2d-tag-cloud-widget-by-sujin/views/metabox-publish.php on line 2
    • > PHP Warning
      include_once(SJ_2DTAG_VIEW_DIR/admin-tabs.php): failed to open stream: No such file or directory in wp-content/plugins/2d-tag-cloud-widget-by-sujin/views/admin-under-3.4.php on line 2

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=sujin-2d-tag-cloud
    • > Rendering (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1 The specified value "!" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 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
2 plugin tags: tag, cloud

2d-tag-cloud-widget-by-sujin/two-dimensional-tag-cloud-sujin.php 77% from 13 tests

"2D Tag Cloud" version 6.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("2d-tag-cloud-widget-by-sujin.php" instead of "two-dimensional-tag-cloud-sujin.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 202 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected3,811 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript144052311,930
PHP182942381,060
CSS49135569
PO File1404293
HTML121092
Markdown122032
JSON10028
YAML1007

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity14.29
▷ Minimum class complexity2.00
▷ Maximum class complexity32.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods45
▷ Static methods2146.67%
▷ Public methods3475.56%
▷ Protected methods24.44%
▷ Private methods920.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.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
No PNG files were detected