84% wp-frequently-searched-words

Code Review | Frequently Searched Words

WordPress plugin Frequently Searched Words scored84%from 54 tests.

About plugin

  • Plugin page: wp-frequently-sea...
  • Plugin version: 2.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.2-5.6.1
  • WordPress version: 6.3.1
  • First release: Feb 14, 2017
  • Latest release: Feb 14, 2021
  • Number of updates: 36
  • Update frequency: every 40.6 days
  • Top authors: miiitaka (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,146 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.87ms] Passed 4 tests

Server-side resources used by Frequently Searched Words
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.28 ▲1.12
Dashboard /wp-admin3.35 ▲0.0548.64 ▲3.13
Posts /wp-admin/edit.php3.46 ▲0.1145.07 ▲5.20
Add New Post /wp-admin/post-new.php5.93 ▲0.0485.22 ▼16.03
Media Library /wp-admin/upload.php3.27 ▲0.0436.70 ▲4.30

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 12 new files
Database: 1 new table, 6 new options
New tables
wp_frequently_searched_words
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Frequently Searched Words
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8414.28 ▲0.072.15 ▲0.5541.49 ▲5.17
Dashboard /wp-admin2,214 ▲365.61 ▼0.0597.67 ▼15.7742.99 ▼1.12
Posts /wp-admin/edit.php2,116 ▲131.99 ▼0.0335.43 ▼3.0932.43 ▼1.58
Add New Post /wp-admin/post-new.php1,539 ▲423.34 ▲5.07657.59 ▲4.2851.29 ▼27.80
Media Library /wp-admin/upload.php1,416 ▲134.19 ▼0.0198.09 ▲2.7845.65 ▲4.02

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% 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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-frequently-searched-words/wp-frequently-searched-words.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Save the word you searched in the site search and display it in a favorite place with a short code.), #2 (You can see the number of words searched on the administration menu.)
The official readme.txt might help

wp-frequently-searched-words/wp-frequently-searched-words.php Passed 13 tests

The principal PHP file in "Frequently Searched Words" v. 2.1.3 is loaded by WordPress automatically on each request
80 characters long description:
It is possible to register and display frequently searched words in site search.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin361 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP569232298
PO File1111535
CSS17028

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity6.40
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods2187.50%
▷ Protected methods00.00%
▷ Private methods312.50%
Functions0
▷ Named functions00.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.06MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png28.52KB9.61KB▼ 66.31%
screenshot-1.png31.23KB10.87KB▼ 65.20%