84% site-search-analytics-by-measured-search

Code Review | Site Search Analytics by Measured Search

WordPress plugin Site Search Analytics by Measured Search scored 84% from 54 tests.

About plugin

  • Plugin page: site-search-analy...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Jul 20, 2013
  • Latest release: Jul 30, 2013
  • Number of updates: 13
  • Update frequency: every 0.8 days
  • Top authors: measuredsearch (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 1,974 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.30ms] Passed 4 tests

An overview of server-side resources used by Site Search Analytics by Measured Search
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0140.14 ▼3.53
Dashboard /wp-admin3.32 ▲0.0245.95 ▼3.85
Posts /wp-admin/edit.php3.37 ▲0.0146.55 ▼0.14
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.99 ▼4.20
Media Library /wp-admin/upload.php3.24 ▲0.0133.41 ▼1.62

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Site Search Analytics by Measured Search
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.68 ▼0.741.70 ▼0.7440.13 ▼0.74
Dashboard /wp-admin2,222 ▲344.86 ▼0.06105.82 ▲1.0439.34 ▼5.88
Posts /wp-admin/edit.php2,108 ▲192.17 ▲0.1938.19 ▼1.5135.52 ▲0.62
Add New Post /wp-admin/post-new.php1,555 ▲2218.57 ▼4.35632.44 ▲11.8772.15 ▲16.01
Media Library /wp-admin/upload.php1,404 ▲164.20 ▲0.0292.33 ▼17.0939.96 ▼12.33

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/site-search-analytics-by-measured-search/site-search-analytics-measured-search.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
10 plugin tags: click tracking, search tracking, analytics, site search, top searches...

site-search-analytics-by-measured-search/site-search-analytics-measured-search.php 92% from 13 tests

Analyzing the main PHP file in "Site Search Analytics by Measured Search" version 1.1
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("site-search-analytics-by-measured-search.php" instead of "site-search-analytics-measured-search.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin5,262 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
CSS1955205,192
PHP1122070

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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
3 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/measuredsearch_logo.png3.45KB1.89KB▼ 45.23%
img/glyphicons-halflings-white.png8.57KB9.20KB0.00%
img/glyphicons-halflings.png12.50KB10.35KB▼ 17.19%