71% fiverr-official-search-box

Code Review | Fiverr.com Official Search Box

WordPress plugin Fiverr.com Official Search Box scored71%from 54 tests.

About plugin

  • Plugin page: fiverr-official-s...
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-5.8
  • WordPress version: 6.3.1
  • First release: Jun 22, 2020
  • Latest release: Aug 6, 2021
  • Number of updates: 17
  • Update frequency: every 24.4 days
  • Top authors: fiverraffiliates (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,592 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼1.02ms] Passed 4 tests

Server-side resources used by Fiverr.com Official Search Box
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1437.82 ▼2.15
Dashboard /wp-admin3.44 ▲0.1346.50 ▼1.78
Posts /wp-admin/edit.php3.55 ▲0.1953.06 ▲7.98
Add New Post /wp-admin/post-new.php6.04 ▲0.1585.26 ▼3.20
Media Library /wp-admin/upload.php3.36 ▲0.1335.93 ▲3.07
Fiverr Affiliate Settings /wp-admin/options-general.php?page=fiverrwidget3.3531.59

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 133 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_wpb_widget
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Fiverr.com Official Search Box
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲16913.39 ▼0.901.91 ▼0.1241.46 ▼6.62
Dashboard /wp-admin2,288 ▲975.20 ▲0.27121.34 ▲19.3339.27 ▼0.43
Posts /wp-admin/edit.php2,171 ▲822.47 ▲0.4448.64 ▲13.0535.32 ▼0.32
Add New Post /wp-admin/post-new.php1,584 ▲7023.29 ▼0.12589.76 ▼91.9933.65 ▼22.56
Media Library /wp-admin/upload.php1,470 ▲824.52 ▲0.28102.02 ▼0.8742.43 ▼2.50
Fiverr Affiliate Settings /wp-admin/options-general.php?page=fiverrwidget1,2982.3552.7465.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_wpb_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=fiverrwidget
    • > Notice in wp-content/plugins/fiverr-official-search-box/inc/fawp-class-helper.php+142
    Trying to access array offset on value of type bool

SRP 0% 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
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/fiverr-official-search-box/admin/tpl/admin_notice.php
    • > /wp-content/plugins/fiverr-official-search-box/admin/tpl/main.php
    • > /wp-content/plugins/fiverr-official-search-box/inc/tpl-widget.php
  • 23× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function fiverrAffiliateWidgetPlugin() in wp-content/plugins/fiverr-official-search-box/admin/tpl/shortcode-popup.php:2
    • > PHP Notice
      Undefined variable: logo in wp-content/plugins/fiverr-official-search-box/inc/tpl-widget.php on line 7
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/fiverr-official-search-box/inc/tpl-widget.php on line 11
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/fiverr-official-search-box/inc/tpl-widget.php on line 7
    • > PHP Notice
      Undefined variable: search_placeholder in wp-content/plugins/fiverr-official-search-box/inc/tpl-widget.php on line 17
    • > PHP Notice
      Undefined variable: widget_style in wp-content/plugins/fiverr-official-search-box/inc/tpl-widget.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fiverr-official-search-box/inc/wp-fiverr-affiliate-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/fiverr-official-search-box/inc/fawp-class.php:389
    • > PHP Notice
      Undefined variable: widget_style in wp-content/plugins/fiverr-official-search-box/inc/tpl-widget.php on line 2
    • > PHP Notice
      Undefined variable: widget_style in wp-content/plugins/fiverr-official-search-box/inc/tpl-widget.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
No plugin tags provided

fiverr-official-search-box/fiverrwidget-plugin.php 62% from 13 tests

"Fiverr.com Official Search Box" version 1.0.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Domain Path: The domain path is invalid: folder "/lang" does not exist
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("fiverr-official-search-box.php" instead of "fiverrwidget-plugin.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("4.9" instead of "4.7.0")
  • Description: Keep the plugin description shorter than 140 characters (currently 212 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected4,168 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript52475991,923
PHP105131776
CSS157685707
HTML200700
SVG120059
Sass1013

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity25.67
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity3.24
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods33
▷ Static methods26.06%
▷ Public methods2678.79%
▷ Protected methods00.00%
▷ Private methods721.21%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants26
▷ Global constants26100.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
13 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/tooltip-icon.png0.49KB0.36KB▼ 26.35%
assets/img/reset-icon.png0.28KB0.28KB0.00%
assets/img/radio-active-icon.png0.54KB0.39KB▼ 26.78%
assets/img/fiverr-logo-regular-setting.png1.01KB0.62KB▼ 38.48%
assets/img/select-icon.png0.21KB0.17KB▼ 20.47%