73% hivepress

Code Review | HivePress - Business Directory & Classified Ads WordPress Plugin

WordPress plugin HivePress - Business Directory & Classified Ads WordPress Plugin scored73%from 54 tests.

About plugin

  • Plugin page: hivepress
  • Plugin version: 1.7.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Oct 11, 2018
  • Latest release: Sep 25, 2023
  • Number of updates: 84
  • Update frequency: every 21.6 days
  • Top authors: hivepress (100%)

Code review

54 tests

User reviews

172 reviews

Install metrics

10,000+ active /229,613 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲1.46MB] [CPU: ▲19.01ms] 75% from 4 tests

A check of server-side resources used by HivePress - Business Directory & Classified Ads WordPress Plugin
Please fix the following
  • CPU: The total CPU usage must kept under 500.00ms (currently 1,001.48ms on /wp-admin/admin.php?page=hp_extensions)
PageMemory (MB)CPU Time (ms)
Home /5.09 ▲1.6392.22 ▲38.71
Dashboard /wp-admin4.70 ▲1.3961.38 ▲13.55
Posts /wp-admin/edit.php4.81 ▲1.4663.78 ▲16.03
Add New Post /wp-admin/post-new.php7.95 ▲2.07109.76 ▲21.60
Media Library /wp-admin/upload.php4.58 ▲1.3557.40 ▲24.86
Categories /wp-admin/edit-tags.php?taxonomy=hp_vendor_category&post_type=hp_vendor4.6053.91
Add New /wp-admin/post-new.php?post_type=hp_vendor4.94106.30
Themes /wp-admin/admin.php?page=hp_themes4.641,429.51
Extensions /wp-admin/admin.php?page=hp_extensions4.751,001.48
Emails /wp-admin/edit.php?post_type=hp_email4.6855.30
Attributes /wp-admin/edit.php?post_type=hp_user_attribute4.6850.61
Listings /wp-admin/edit.php?post_type=hp_listing4.6951.98
Scheduled Actions /wp-admin/tools.php?page=action-scheduler4.6976.66
Templates /wp-admin/edit.php?post_type=hp_template4.6949.24
Vendors /wp-admin/edit.php?post_type=hp_vendor4.6851.68

Server storage [IO: ▲29.56MB] [DB: ▲0.06MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please try to fix the following items
  • The filesystem usage should be lower than 25MB (currently using 29.56MB)
Filesystem: 2,071 new files
Database: 4 new tables, 48 new options
New tables
wp_actionscheduler_actions
wp_actionscheduler_claims
wp_actionscheduler_logs
wp_actionscheduler_groups
New WordPress options
theysaidso_admin_options
hp_listing_enable_reporting
hp_user_enable_registration
hp_listing_storage_period
widget_recent-comments
hp_user_verify_email
hp_listing_title_format
hp_vendor_display_name
hp_recaptcha_forms
action_scheduler_lock_async-request-runner
...

Browser metrics Passed 4 tests

HivePress - Business Directory & Classified Ads WordPress Plugin: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,211 ▲47615.56 ▲1.3416.60 ▲14.7836.79 ▼8.34
Dashboard /wp-admin2,402 ▲2146.19 ▲1.12122.13 ▲10.2289.05 ▲46.41
Posts /wp-admin/edit.php2,311 ▲2223.38 ▲1.3951.16 ▲10.4235.35 ▼0.61
Add New Post /wp-admin/post-new.php6,388 ▲4,87419.51 ▲1.87950.67 ▲330.7537.13 ▼14.72
Media Library /wp-admin/upload.php1,595 ▲2135.86 ▲1.61106.29 ▲10.3590.28 ▲50.04
Categories /wp-admin/edit-tags.php?taxonomy=hp_vendor_category&post_type=hp_vendor1,6474.4455.5592.32
Add New /wp-admin/post-new.php?post_type=hp_vendor2,5858.45205.94147.20
Themes /wp-admin/admin.php?page=hp_themes1,1533.0734.3129.57
Extensions /wp-admin/admin.php?page=hp_extensions2,0653.0934.9536.42
Emails /wp-admin/edit.php?post_type=hp_email1,2693.2040.9168.01
Attributes /wp-admin/edit.php?post_type=hp_user_attribute1,2723.2240.0032.41
Listings /wp-admin/edit.php?post_type=hp_listing1,2973.1942.1476.47
Scheduled Actions /wp-admin/tools.php?page=action-scheduler1,7633.1238.4836.66
Templates /wp-admin/edit.php?post_type=hp_template1,2783.2046.1150.25
Vendors /wp-admin/edit.php?post_type=hp_vendor1,2963.2140.0733.41

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall successfully, leaving 4 tables in the database
    • wp_actionscheduler_actions
    • wp_actionscheduler_claims
    • wp_actionscheduler_logs
    • wp_actionscheduler_groups
  • This plugin did not uninstall successfully, leaving 48 options in the database
    • hp_listings_per_page
    • hp_vendor_search_fields
    • hp_vendor_enable_display
    • hp_listing_expiration_period
    • hp_listing_allow_video
    • hp_vendor_display_name
    • hp_page_listings
    • hp_core_version
    • hp_core_activated
    • hp_page_listing_submission_terms
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 115× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'League\\OAuth2\\Client\\Provider\\AbstractProvider' not found in wp-content/plugins/hivepress/vendor/league/oauth2-google/src/Provider/Google.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/hivepress/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/hivepress/vendor/guzzlehttp/promises/src/Coroutine.php:45
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\OAuth2\\Client\\OptionProvider\\OptionProviderInterface' not found in wp-content/plugins/hivepress/vendor/league/oauth2-client/src/OptionProvider/PostAuthOptionProvider.php:23
    • > PHP Warning
      require(wp-content/plugins/hivepress/vendor/league/oauth2-google/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/hivepress/vendor/league/oauth2-google/examples/provider.php on line 3
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/hivepress/vendor/guzzlehttp/psr7/src/NoSeekStream.php:12
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/hivepress/vendor/league/oauth2-google/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/hivepress/vendor/league/oauth2-google/examples/provider.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Psr7\\Request' not found in wp-content/plugins/hivepress/vendor/guzzlehttp/psr7/src/ServerRequest.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_AdminView_Deprecated' not found in wp-content/plugins/hivepress/vendor/woocommerce/action-scheduler/classes/ActionScheduler_AdminView.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Abstract_QueueRunner' not found in wp-content/plugins/hivepress/vendor/woocommerce/action-scheduler/classes/WP_CLI/ActionScheduler_WPCLI_QueueRunner.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5, #6 in hivepress/assets to your readme.txt
You can look at the official readme.txt

hivepress/hivepress.php Passed 13 tests

The principal PHP file in "HivePress - Business Directory & Classified Ads WordPress Plugin" v. 1.7.1 is loaded by WordPress automatically on each request
53 characters long description:
Multipurpose directory, listing & classifieds plugin.

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
Success! There were no dangerous files found in this plugin230,146 lines of code in 1,989 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript86516,15711,787120,114
PHP49710,22322,40739,275
HTML2825841531,534
CSS4244133310,620
TypeScript1445812,0398,104
Markdown552,64007,531
SVG10145,061
JSON39102,726
Sass17258842,184
LESS43621071,968
Stylus1122016733
EJS11221167
XML20047
YAML541037
Mustache15027
Ruby1208
Bourne Shell2305
make1305

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity11.58
▷ Minimum class complexity1.00
▷ Maximum class complexity212.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces35
Interfaces33
Traits13
Classes356
▷ Abstract classes4011.24%
▷ Concrete classes31688.76%
▷ Final classes7122.47%
Methods2,422
▷ Static methods30812.72%
▷ Public methods1,89378.16%
▷ Protected methods38715.98%
▷ Private methods1425.86%
Functions252
▷ Named functions7830.95%
▷ Anonymous functions17469.05%
Constants101
▷ Global constants21.98%
▷ Class constants9998.02%
▷ Public constants8888.89%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
18 PNG files occupy 0.65MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
node_modules/intl-tel-input/screenshots/twilio.png20.05KB9.61KB▼ 52.07%
assets/images/jquery-ui/ui-icons_777620_256x240.png4.57KB4.18KB▼ 8.43%
assets/images/jquery-ui/ui-icons_cc0000_256x240.png4.57KB4.18KB▼ 8.43%
node_modules/chart.js/dist/docs/assets/img/event_flowchart.83015c7a.png37.29KB7.79KB▼ 79.11%
node_modules/intl-tel-input/screenshots/separateDialCode.png3.94KB3.27KB▼ 16.90%