10% search-terms-cloud

Code Review | Search terms cloud

WordPress plugin Search terms cloud scored10%from 54 tests.

About plugin

  • Plugin page: search-terms-cloud
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-3.8
  • WordPress version: 6.3.1
  • First release: Jan 7, 2014
  • Latest release: Jan 13, 2014
  • Number of updates: 9
  • Update frequency: every 0.7 days
  • Top authors: younes.rafie (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,036 total downloads

Benchmarks

Plugin footprint 23% 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
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/search-terms-cloud/search_terms_query.php+125
    Non-static method RY\search_terms\Utils::defaultOptions() should not be called statically

Server metrics [RAM: ▼0.83MB] [CPU: ▼42.53ms] Passed 4 tests

This is a short check of server-side resources used by Search terms cloud
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0822.45 ▼22.44
Dashboard /wp-admin3.12 ▼0.2224.54 ▼44.66
Posts /wp-admin/edit.php3.12 ▼0.2325.50 ▼28.09
Add New Post /wp-admin/post-new.php3.12 ▼2.7626.72 ▼74.93
Media Library /wp-admin/upload.php3.12 ▼0.1123.07 ▼13.98
Search terms cloud /wp-admin/options-general.php?page=search-terms-cloud/search_terms_settings.php3.1226.81

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 12 new files
Database: 1 new table, 8 new options
New tables
wp_search_terms
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
search_terms_settings
can_compress_scripts
widget_search_terms_widget

Browser metrics Passed 4 tests

A check of browser resources used by Search terms cloud
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.23 ▼1.141.82 ▲0.0244.51 ▼1.15
Dashboard /wp-admin2,216 ▲284.87 ▼0.95106.86 ▼8.2738.43 ▼0.77
Posts /wp-admin/edit.php2,099 ▲102.06 ▲0.0139.87 ▲0.8437.50 ▲2.41
Add New Post /wp-admin/post-new.php1,532 ▲1318.02 ▼5.05617.09 ▼43.3854.44 ▲0.73
Media Library /wp-admin/upload.php1,401 ▲104.47 ▲0.26100.48 ▼6.2846.05 ▼3.12
Search terms cloud /wp-admin/options-general.php?page=search-terms-cloud/search_terms_settings.php9671.8030.2129.17

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/search-terms-cloud/search_terms_settings.php+11
    Non-static method RY\search_terms\Utils::defaultOptions() should not be called statically
  • Zombie tables were found after uninstall: 1 table
    • wp_search_terms
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • search_terms_settings
    • widget_search_terms_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=search-terms-cloud/search_terms_settings.php
    • > Deprecated in wp-content/plugins/search-terms-cloud/search_terms_settings.php+11
    Non-static method RY\search_terms\Utils::defaultOptions() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=search-terms-cloud/search_terms_settings.php
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method RY\search_terms\SearchTermsSettings::display_page() should not be called statically

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× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/search-terms-cloud/search_terms_query.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function RY\\search_terms\\add_action() in wp-content/plugins/search-terms-cloud/search_terms_settings.php:102
    • > PHP Fatal error
      Uncaught Error: Call to undefined function RY\\search_terms\\add_action() in wp-content/plugins/search-terms-cloud/search_terms_settings.php:102
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/search-terms-cloud/search_terms_widget.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% 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
3 plugin tags: terms, search, cloud

search-terms-cloud/search_terms_query.php 92% from 13 tests

The entry point to "Search terms cloud" version 0.1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("search-terms-cloud.php" instead of "search_terms_query.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,263 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2836466
CSS21023384
PHP589100350
PO File1222263

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity5.50
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.78
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions112.50%
▷ Anonymous functions787.50%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected