79% city-hive

Code Review | City Hive

WordPress plugin City Hive scored79%from 54 tests.

About plugin

  • Plugin page: city-hive
  • Plugin version: 0.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0-4.4
  • WordPress version: 6.3.1
  • First release: May 21, 2015
  • Latest release: Dec 22, 2015
  • Number of updates: 62
  • Update frequency: every 3.5 days
  • Top authors: itai136 (66.13%)nimrodg (35.48%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /1,538 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼8.71ms] Passed 4 tests

A check of server-side resources used by City Hive
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0642.52 ▼5.28
Dashboard /wp-admin3.38 ▲0.0345.63 ▼13.78
Posts /wp-admin/edit.php3.49 ▲0.1347.93 ▲4.73
Add New Post /wp-admin/post-new.php5.98 ▲0.0990.95 ▼13.63
Media Library /wp-admin/upload.php3.30 ▲0.0733.62 ▼2.14
City Hive Settings /wp-admin/options-general.php?page=city-hive/city-hive-settings-menu.php3.2732.98

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for City Hive
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲12414.35 ▲0.0033.95 ▲31.6444.65 ▲2.18
Dashboard /wp-admin2,206 ▲265.10 ▼0.5583.24 ▼5.2137.72 ▼5.86
Posts /wp-admin/edit.php2,117 ▲142.33 ▲0.3136.14 ▼6.0134.20 ▼1.25
Add New Post /wp-admin/post-new.php6,378 ▲4,84119.23 ▲0.92966.91 ▲301.1144.23 ▼30.04
Media Library /wp-admin/upload.php1,408 ▲54.46 ▲0.3595.87 ▼17.5544.96 ▼1.89
City Hive Settings /wp-admin/options-general.php?page=city-hive/city-hive-settings-menu.php1,0051.8922.8924.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/city-hive/city-hive-settings-menu.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/city-hive/city-hive-update-handler.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/city-hive/city-hive-header-loader.php:150
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/city-hive/city-hive-widget.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/city-hive/city-hive-activation.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/city-hive/city-hive.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=city-hive/city-hive-settings-menu.php
    • > Network (severe)
    wp-content/plugins/city-hive/js/producers.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: widget, city hive, advertising, shop, e-commerce...

city-hive/city-hive.php Passed 13 tests

The principal PHP file in "City Hive" v. 0.2.0 is loaded by WordPress automatically on each request
31 characters long description:
Show City Hive buy local widget

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
Everything looks great! No dangerous files found in this plugin2,577 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript34022842,086
PHP810849447
CSS15044

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin