10% gna-search-shortcode

Code Review | GNA Search Shortcode

WordPress plugin GNA Search Shortcode scored 10% from 54 tests.

About plugin

  • Plugin page: gna-search-shortcode
  • Plugin version: 0.9.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.7
  • WordPress version: 5.8.1
  • First release: Feb 5, 2016
  • Latest release: Sep 5, 2016
  • Number of updates: 14
  • Update frequency: every 22.4 days
  • Top authors: chris_dev (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active / 2,744 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-includes/class-wp-hook.php+303
    Non-static method GNA_SearchShortcode::activate_handler() should not be called statically

Server metrics [RAM: ▲0.02MB] [CPU: ▼135.36ms] Passed 4 tests

An overview of server-side resources used by GNA Search Shortcode
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1532.71 ▲10.64
Dashboard /wp-admin3.08 ▲0.0343.92 ▲2.61
Posts /wp-admin/edit.php3.14 ▲0.0343.96 ▲0.58
Add New Post /wp-admin/post-new.php5.44 ▲0.0190.12 ▼547.41
Media Library /wp-admin/upload.php3.03 ▲0.0334.48 ▲2.78

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for GNA Search Shortcode
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,705 ▲10915.93 ▲0.289.59 ▼1.3243.73 ▼2.99
Dashboard /wp-admin2,973 ▲425.90 ▼0.22137.68 ▼2.84107.90 ▼3.31
Posts /wp-admin/edit.php2,736 ▼32.72 ▼0.1261.85 ▼7.6695.24 ▲5.69
Add New Post /wp-admin/post-new.php1,672 ▲5719.20 ▼2.67379.04 ▲100.95105.96 ▲5.46
Media Library /wp-admin/upload.php1,751 ▼565.02 ▼0.02142.26 ▼15.53125.21 ▲13.43

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
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-includes/class-wp-hook.php+303
    Non-static method GNA_SearchShortcode::deactivate_handler() should not be called statically

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
Everything seems fine, however this is by no means 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/gna-search-shortcode/gna-search-shortcode-core.php:25

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 97% 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 your attention:
  • Donate link: Please fix this invalid URI: ""
Please take inspiration from this readme.txt

gna-search-shortcode/gna-search-shortcode.php Passed 13 tests

The entry point to "GNA Search Shortcode" version 0.9.5 is a PHP file that has certain tags in its header comment area
54 characters long description:
[searchform] shortcode for any pages, posts or widgets

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 plugin113 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22711109
CSS1004

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.17
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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 images were found in this plugin