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

Code Review | 2D Tag Cloud

WordPress plugin 2D Tag Cloud scored 62% 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: 5.9.2
  • 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

300+ active / 10,446 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼293.30ms] Passed 4 tests

An overview of server-side resources used by 2D Tag Cloud
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0570.29 ▲16.15
Dashboard /wp-admin3.44 ▲0.0347.07 ▲11.76
Posts /wp-admin/edit.php3.66 ▲0.0240.57 ▼3.81
Add New Post /wp-admin/post-new.php6.90 ▼0.0798.99 ▼1,181.76
Media Library /wp-admin/upload.php3.31 ▲0.0224.44 ▲0.60
2D Tag Cloud /wp-admin/options-general.php?page=sujin-2d-tag-cloud3.3624.90

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 47 new files
Database: 1 new table, 2 new options
New tables
wp_terms_hit
New WordPress options
SJ_2DTAG_version
SJ_2DTAG_CONFIG

Browser metrics Passed 4 tests

Checking browser requirements for 2D Tag Cloud
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,768 ▲1416.01 ▲0.255.82 ▼0.812.28 ▼0.72
Dashboard /wp-admin2,897 ▲436.12 ▼0.07114.54 ▼26.28156.26 ▼4.30
Posts /wp-admin/edit.php2,696 ▲113.24 ▼0.0063.24 ▼1.39147.50 ▲2.19
Add New Post /wp-admin/post-new.php1,671 ▲718.09 ▲1.17394.20 ▲2.88157.75 ▲3.28
Media Library /wp-admin/upload.php1,706 ▲85.55 ▲0.01133.15 ▼5.21186.09 ▲4.60
2D Tag Cloud /wp-admin/options-general.php?page=sujin-2d-tag-cloud3,9385.28221.22848.48

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
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_terms_hit
  • This plugin does not fully uninstall, leaving 2 options in the database
    • SJ_2DTAG_CONFIG
    • SJ_2DTAG_version

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
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 4× GET requests to PHP files return non-empty strings:
    • > /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 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
      Use of undefined constant SJ_2DTAG_VIEW_DIR - assumed 'SJ_2DTAG_VIEW_DIR' (this will throw an Error in a future version of 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_field() in wp-content/plugins/2d-tag-cloud-widget-by-sujin/views/admin-under-3.4.php:15
    • > 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 _e() in wp-content/plugins/2d-tag-cloud-widget-by-sujin/views/metabox-colors.php:16
    • > PHP Warning
      Use of undefined constant SJ_2DTAG_VIEW_DIR - assumed 'SJ_2DTAG_VIEW_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/2d-tag-cloud-widget-by-sujin/views/admin.php on line 2
    • > 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 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.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
    • > PHP Notice
      Undefined variable: option in wp-content/plugins/2d-tag-cloud-widget-by-sujin/views/metabox-colors.php on line 5

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > 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=5.9.2 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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate 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

The main PHP script in "2D Tag Cloud" version 6.0.2 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: The description should be shorter than 140 characters (currently 202 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("2d-tag-cloud-widget-by-sujin.php" instead of "two-dimensional-tag-cloud-sujin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions 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

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin