84% wp-static-search

Code Review | WP Static Search

WordPress plugin WP Static Search scored84%from 54 tests.

About plugin

  • Plugin page: wp-static-search
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.4
  • WordPress version: 6.3.1
  • First release: May 11, 2020
  • Latest release: May 11, 2020
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: gergelyszerovay (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /489 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.64MB] [CPU: ▼17.17ms] Passed 4 tests

Server-side resources used by WP Static Search
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0445.94 ▲4.67
Dashboard /wp-admin3.34 ▲0.0446.02 ▼3.34
Posts /wp-admin/edit.php3.46 ▲0.1049.93 ▼0.29
Add New Post /wp-admin/post-new.php3.22 ▼2.6736.16 ▼64.27
Media Library /wp-admin/upload.php3.27 ▲0.0436.95 ▼0.76

Server storage [IO: ▲0.06MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WP Static Search
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6314.25 ▲0.251.63 ▼0.0138.63 ▼0.61
Dashboard /wp-admin2,216 ▲365.62 ▼0.0483.97 ▼6.0436.64 ▼8.18
Posts /wp-admin/edit.php2,118 ▲391.98 ▼0.0035.35 ▼2.2631.70 ▼7.51
Add New Post /wp-admin/post-new.php1,552 ▲2322.96 ▼0.27607.79 ▼26.7962.74 ▲4.63
Media Library /wp-admin/upload.php1,421 ▲184.18 ▲0.04100.60 ▲2.7244.76 ▲0.44

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-static-search/wp-static-search.php:16

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 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Donate link: Invalid url: ""
You can look at the official readme.txt

wp-static-search/wp-static-search.php Passed 13 tests

"WP Static Search" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
50 characters long description:
Static search plugin for Wordpress static websites

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
Everything looks great! No dangerous files found in this plugin608 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript45866329
PHP25717202
CSS113253
Markdown221024

PHP code Passed 2 tests

This is a very shot 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.18
Average class complexity2.75
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.64
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
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