78% search-meter

Code Review | Search Meter

WordPress plugin Search Meter scored 78% from 54 tests.

About plugin

  • Plugin page: search-meter
  • Plugin version: 2.13.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Jun 2, 2008
  • Latest release: Jan 4, 2023
  • Number of updates: 102
  • Update frequency: every 52.3 days
  • Top authors: bennettmcelwee (100%)

Code review

54 tests

User reviews

27 reviews

Install metrics

20,000+ active / 392,916 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.15MB] [CPU: ▲1.62ms] Passed 4 tests

A check of server-side resources used by Search Meter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.46 ▲0.04
Dashboard /wp-admin3.48 ▲0.1854.22 ▲2.94
Posts /wp-admin/edit.php3.59 ▲0.2453.14 ▲8.04
Add New Post /wp-admin/post-new.php6.06 ▲0.1795.26 ▼0.37
Media Library /wp-admin/upload.php3.40 ▲0.1739.14 ▲3.85
Search Meter /wp-admin/options-general.php?page=search-meter/admin.php3.3734.41
Search Meter /wp-admin/index.php?page=search-meter/admin.php3.3431.42

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 9 new files
Database: 2 new tables, 8 new options
New tables
wp_searchmeter_recent
wp_searchmeter
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent_searches
widget_recent-posts
can_compress_scripts
widget_popular_searches
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Search Meter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,871 ▲13613.53 ▼0.651.87 ▼0.1243.81 ▼4.86
Dashboard /wp-admin2,277 ▲865.88 ▲0.97102.58 ▼2.4237.50 ▼7.95
Posts /wp-admin/edit.php2,100 ▲82.01 ▼0.0237.46 ▲0.4633.71 ▼0.37
Add New Post /wp-admin/post-new.php1,542 ▲2823.26 ▲5.68607.23 ▼22.0453.71 ▼8.75
Media Library /wp-admin/upload.php1,393 ▲24.20 ▼0.0399.32 ▼15.2042.70 ▼6.08
Search Meter /wp-admin/options-general.php?page=search-meter/admin.php9412.1726.3327.51
Search Meter /wp-admin/index.php?page=search-meter/admin.php9412.0228.5926.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_popular_searches
    • db_upgraded
    • widget_recent_searches
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/index.php?page=search-meter/admin.php
    • > Notice in wp-content/plugins/search-meter/admin.php+315
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/search-meter/search-meter.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/search-meter/admin.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (The Search Meter administration interface, showing some of the reports available.) image required
The official readme.txt might help

search-meter/search-meter.php 92% from 13 tests

The principal PHP file in "Search Meter" v. 2.13.5 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 204 characters long)

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
Success! There were no dangerous files found in this plugin1,040 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3166133829
PO File17786211

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions33
▷ Named functions33100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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