94% gfirem-advance-search

Code Review | GFireM Advance Search

WordPress plugin GFireM Advance Search scored 94% from 54 tests.

About plugin

  • Plugin page: gfirem-advance-se...
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.7.3
  • WordPress version: 5.9.2
  • First release: Mar 23, 2017
  • Latest release: Apr 27, 2017
  • Number of updates: 11
  • Update frequency: every 2.9 days
  • Top authors: gfirem (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 808 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by GFireM Advance Search
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0156.64 ▲4.88
Dashboard /wp-admin3.41 ▲0.0032.78 ▼0.85
Posts /wp-admin/edit.php3.64 ▲0.0038.74 ▲1.82
Add New Post /wp-admin/post-new.php6.88 ▼0.0999.07 ▼1,163.83
Media Library /wp-admin/upload.php3.29 ▲0.0022.76 ▼3.12

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 153 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for GFireM Advance Search
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,789 ▲3515.60 ▼0.186.03 ▼0.712.48 ▼0.63
Dashboard /wp-admin2,888 ▲306.06 ▼0.14120.15 ▼14.59155.64 ▼3.74
Posts /wp-admin/edit.php2,691 ▼03.23 ▼0.0063.41 ▲0.61139.75 ▼0.75
Add New Post /wp-admin/post-new.php1,661 ▼016.10 ▲0.49416.93 ▼22.14152.42 ▼1.70
Media Library /wp-admin/upload.php1,698 ▼35.54 ▲0.07147.15 ▲4.57199.33 ▲14.91

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Almost there! Just 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 wp_nonce_field() in wp-content/plugins/gfirem-advance-search/view/meta_box.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: formidable filter order, formidable display, formidable view filter, formidable scroll view, formidable...

gfirem-advance-search/gfirem_adv_search.php 92% from 13 tests

This is the main PHP file of "GFireM Advance Search" version 1.2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("gfirem-advance-search.php" instead of "gfirem_adv_search.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin23,075 lines of code in 125 files:
LanguageFilesBlank linesComment linesLines of code
PHP853,6988,76516,075
PO File51,8741,8974,811
Sass16277821,713
JavaScript53877208
Markdown1610192
JSON20042
CSS112934

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 1,051)
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity33.06
▷ Minimum class complexity1.00
▷ Maximum class complexity1,051.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity76.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes53
▷ Abstract classes23.77%
▷ Concrete classes5196.23%
▷ Final classes00.00%
Methods739
▷ Static methods11315.29%
▷ Public methods55675.24%
▷ Protected methods121.62%
▷ Private methods17123.14%
Functions75
▷ Named functions7397.33%
▷ Anonymous functions22.67%
Constants101
▷ Global constants8483.17%
▷ Class constants1716.83%
▷ Public constants17100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/freemius/assets/img/formidable_search.png9.16KB5.26KB▼ 42.58%
includes/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
includes/freemius/assets/img/gfirem_adv_search.png9.16KB5.26KB▼ 42.58%