83% ehive-search

Code Review | eHive Search

WordPress plugin eHive Search scored83%from 54 tests.

About plugin

  • Plugin page: ehive-search
  • Plugin version: 2.4.4
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-6.2
  • WordPress version: 6.3.1
  • First release: Apr 16, 2013
  • Latest release: Sep 27, 2023
  • Number of updates: 68
  • Update frequency: every 56.3 days
  • Top authors: vernonsystems (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /3,424 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
Installer ran successfully

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

Analyzing server-side resources used by eHive Search
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1441.10 ▼9.18
Dashboard /wp-admin3.44 ▲0.1444.99 ▼3.66
Posts /wp-admin/edit.php3.55 ▲0.2046.62 ▼0.80
Add New Post /wp-admin/post-new.php6.02 ▲0.1488.01 ▼8.76
Media Library /wp-admin/upload.php3.36 ▲0.1435.91 ▲0.87

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for eHive Search
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.39 ▼0.851.88 ▼0.1641.73 ▼3.46
Dashboard /wp-admin2,206 ▲244.86 ▼0.95104.16 ▲0.2039.27 ▼3.50
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0135.54 ▼2.3336.67 ▼0.43
Add New Post /wp-admin/post-new.php1,535 ▼723.55 ▲5.35624.35 ▲22.6048.26 ▼4.13
Media Library /wp-admin/upload.php1,391 ▲34.20 ▲0.0395.22 ▼14.3141.83 ▼2.89

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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
Please fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ehive-search/EHiveSearch.php:28
    • > PHP Notice
      Undefined variable: css_class in wp-content/plugins/ehive-search/templates/eHiveSearch.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to a member function getSearchPageLink() on null in wp-content/plugins/ehive-search/templates/eHiveSearch.php:29
    • > PHP Notice
      Undefined variable: eHiveAccess in wp-content/plugins/ehive-search/templates/eHiveSearch.php on line 29

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% 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 to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (screenshot_1.png), #2 (screenshot_2.png)
The official readme.txt is a good inspiration

ehive-search/EHiveSearch.php 85% from 13 tests

The primary PHP file in "eHive Search" version 2.4.4 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ehive-search.php" instead of "EHiveSearch.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 168 characters long)

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
No dangerous file extensions were detected1,070 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP322880976
CSS1202194

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity99.00
▷ Minimum class complexity99.00
▷ Maximum class complexity99.00
Average method complexity3.04
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods48
▷ Static methods00.00%
▷ Public methods4797.92%
▷ Protected methods00.00%
▷ Private methods12.08%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.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
11 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/search_item_lightbox.png2.93KB2.04KB▼ 30.42%
images/no_image_ts.png4.70KB2.33KB▼ 50.43%
images/catalogue_photography.png0.93KB0.63KB▼ 32.60%
images/catalogue_library.png0.60KB0.34KB▼ 44.34%
images/catalogue_archives.png0.42KB0.25KB▼ 42.07%