83% business-listing-manager

Code Review | Business Listing Plugin

WordPress plugin Business Listing Plugin scored83%from 54 tests.

About plugin

  • Plugin page: business-listing-...
  • Plugin version: 2.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.4
  • WordPress version: 6.3.1
  • First release: May 22, 2019
  • Latest release: Aug 12, 2020
  • Number of updates: 20
  • Update frequency: every 22.5 days
  • Top authors: jasonmassive (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /743 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.20MB] [CPU: ▼4.94ms] Passed 4 tests

This is a short check of server-side resources used by Business Listing Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2041.37 ▼0.21
Dashboard /wp-admin3.50 ▲0.2047.93 ▲0.88
Posts /wp-admin/edit.php3.55 ▲0.1941.84 ▼5.52
Add New Post /wp-admin/post-new.php6.19 ▲0.3091.55 ▼12.80
Media Library /wp-admin/upload.php3.42 ▲0.1935.28 ▼1.24
All LocalBizzes /wp-admin/edit.php?post_type=localbiz3.4636.00
Settings /wp-admin/admin.php?page=bizlisting-manager-settings3.3830.56
Add New LocalBiz /wp-admin/post-new.php?post_type=localbiz6.1881.43
LocalBiz Categories /wp-admin/edit-tags.php?taxonomy=localbiz_category&post_type=localbiz3.4132.74
Help /wp-admin/admin.php?page=bizlisting-manager-help3.3829.02

Server storage [IO: ▲0.11MB] [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: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Business Listing Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,861 ▲11513.22 ▼1.211.69 ▼0.0941.47 ▼1.41
Dashboard /wp-admin2,267 ▲755.88 ▲0.8893.68 ▼17.2938.90 ▲1.64
Posts /wp-admin/edit.php2,147 ▲582.00 ▼0.0337.51 ▼2.5937.51 ▼0.74
Add New Post /wp-admin/post-new.php1,581 ▲4823.13 ▲0.08654.32 ▲0.1458.77 ▲12.99
Media Library /wp-admin/upload.php1,449 ▲584.21 ▼0.0497.80 ▼5.3241.37 ▼6.91
All LocalBizzes /wp-admin/edit.php?post_type=localbiz1,1621.9430.5629.76
Settings /wp-admin/admin.php?page=bizlisting-manager-settings9002.0221.4626.95
Add New LocalBiz /wp-admin/post-new.php?post_type=localbiz7,69019.37896.0959.77
LocalBiz Categories /wp-admin/edit-tags.php?taxonomy=localbiz_category&post_type=localbiz1,3172.2628.7727.46
Help /wp-admin/admin.php?page=bizlisting-manager-help9712.0222.9825.90

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

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)
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/business-listing-manager/includes/bizlisting-functions.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/business-listing-manager/bizlisting-manager.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/business-listing-manager/includes/bizlisting-shortcode.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/business-listing-manager/includes/bizlisting-edit-form.php:22

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 86% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Contributors: Plugin contributors not specified
The official readme.txt might help

business-listing-manager/bizlisting-manager.php 77% from 13 tests

The principal PHP file in "Business Listing Plugin" v. 2.1.3 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("business-listing-manager.php" instead of "bizlisting-manager.php")
  • Description: The description should be shorter than 140 characters (currently 333 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 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin1,312 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP52342471,312

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code1.47
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected