79% newer-tag-cloud

Code Review | Newer Tag Cloud

WordPress plugin Newer Tag Cloud scored79%from 54 tests.

About plugin

  • Plugin page: newer-tag-cloud
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.4
  • WordPress version: 6.3.1
  • First release: May 2, 2017
  • Latest release: Aug 1, 2017
  • Number of updates: 25
  • Update frequency: every 11.4 days
  • Top authors: liquidwebdan (88%)mallardduck (16%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /850 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.21MB] [CPU: ▼7.42ms] Passed 4 tests

Server-side resources used by Newer Tag Cloud
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2139.14 ▼3.91
Dashboard /wp-admin3.52 ▲0.1753.67 ▼12.12
Posts /wp-admin/edit.php3.63 ▲0.2753.81 ▲3.89
Add New Post /wp-admin/post-new.php6.12 ▲0.2397.62 ▼14.43
Media Library /wp-admin/upload.php3.44 ▲0.2137.04 ▲0.79
Instance Options /wp-admin/admin.php?page=newer-tag-cloud/instances3.4335.19
Newer Tag Cloud /wp-admin/admin.php?page=newer-tag-cloud3.4236.03

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 33 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_newer-tag-cloud
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Newer Tag Cloud
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲5114.26 ▲0.341.57 ▼0.5038.62 ▼2.67
Dashboard /wp-admin2,226 ▲465.65 ▲0.0493.90 ▲4.2939.69 ▼1.12
Posts /wp-admin/edit.php2,131 ▲252.02 ▲0.0139.01 ▼3.3235.28 ▼1.68
Add New Post /wp-admin/post-new.php1,561 ▲3218.13 ▼5.10625.47 ▼50.8974.28 ▲21.28
Media Library /wp-admin/upload.php1,431 ▲314.14 ▼0.0696.46 ▼20.5144.33 ▼3.93
Instance Options /wp-admin/admin.php?page=newer-tag-cloud/instances1,0832.1426.9138.82
Newer Tag Cloud /wp-admin/admin.php?page=newer-tag-cloud9842.0123.7631.60

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_newer-tag-cloud
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/newer-tag-cloud/front/partials/newer-tag-cloud-public-display.php
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/newer-tag-cloud/tests/bootstrap.php on line 31
    • > PHP Notice
      Undefined variable: cloud in wp-content/plugins/newer-tag-cloud/front/partials/newer-tag-cloud-public-display.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/newer-tag-cloud/admin/partials/newer-tag-cloud-admin-display.php:20
    • > PHP Notice
      Undefined variable: pluginName in wp-content/plugins/newer-tag-cloud/admin/partials/newer-tag-cloud-instances-display.php on line 19
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/newer-tag-cloud/tests/bootstrap.php on line 31
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/newer-tag-cloud/tests/test-basic-tag.php:16
    • > PHP Fatal error
      Uncaught Error: Call to a member function create_selectfield() on null in wp-content/plugins/newer-tag-cloud/admin/partials/newer-tag-cloud-instances-display.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/newer-tag-cloud/tests/test-info.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/newer-tag-cloud/lib/class-newer-tag-cloud-widget.php:26
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/newer-tag-cloud/admin/partials/newer-tag-cloud-instances-display.php on line 21

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 Passed 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
3 plugin tags: tag, widget, cloud

newer-tag-cloud/newer-tag-cloud.php Passed 13 tests

The entry point to "Newer Tag Cloud" version 1.1.2 is a PHP file that has certain tags in its header comment area
113 characters long description:
The plugin provides an widget which shows a tag cloud with the tags used by the new WordPress own tagging feature

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected1,200 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP192067691,009
Bourne Shell121799
CSS212854
XML22022
JavaScript255411
JSON1005

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity7.82
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods57
▷ Static methods23.51%
▷ Public methods4884.21%
▷ Protected methods00.00%
▷ Private methods915.79%
Functions12
▷ Named functions866.67%
▷ Anonymous functions433.33%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin