10% bepro-listings-business-directory

Code Review | BePro Listings Business Directory

WordPress plugin BePro Listings Business Directory scored 10% from 54 tests.

About plugin

  • Plugin page: bepro-listings-bu...
  • Plugin version: 1.0.02
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5.1
  • WordPress version: 5.9.2
  • First release: May 6, 2014
  • Latest release: Sep 29, 2020
  • Number of updates: 41
  • Update frequency: every 57.0 days
  • Top authors: BeyondPrograms (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active / 13,588 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-includes/class-wp-hook.php+307
    Non-static method Bl_business_directory::spawn() should not be called statically

Server metrics [RAM: ▲0.03MB] [CPU: ▼290.05ms] Passed 4 tests

This is a short check of server-side resources used by BePro Listings Business Directory
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.0655.70 ▲5.42
Dashboard /wp-admin3.47 ▲0.0639.00 ▲6.57
Posts /wp-admin/edit.php3.70 ▲0.0536.96 ▲0.66
Add New Post /wp-admin/post-new.php6.94 ▼0.0491.42 ▼1,166.12
Media Library /wp-admin/upload.php3.35 ▲0.0523.84 ▼0.17

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 1 new option
New WordPress options
bepro_listings

Browser metrics Passed 4 tests

BePro Listings Business Directory: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,772 ▲2815.62 ▼0.026.37 ▼0.082.13 ▲0.08
Dashboard /wp-admin2,881 ▲206.11 ▼0.07116.11 ▼17.86156.61 ▼0.22
Posts /wp-admin/edit.php2,694 ▲33.35 ▼0.0264.16 ▼1.67140.61 ▼2.82
Add New Post /wp-admin/post-new.php1,661 ▼016.64 ▲0.62417.11 ▼14.63151.45 ▼5.23
Media Library /wp-admin/upload.php1,698 ▼05.56 ▲0.04150.41 ▲4.96190.99 ▲2.51

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 1 option in the database
    • bepro_listings

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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 take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/bepro-listings-business-directory/templates/bl_directory_1.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/bepro-listings-business-directory/templates/bl_directory_2.php:2

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 issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: business directory, bepro listings, employee directory, business finder, store finder

bepro-listings-business-directory/bepro_listings_business_directory.php 85% from 13 tests

"BePro Listings Business Directory" version 1.0.02's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("bepro-listings-business-directory.php" instead of "bepro_listings_business_directory.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 198 characters long)

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 plugin412 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS453225
PHP34128187

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity37.00
▷ Minimum class complexity37.00
▷ Maximum class complexity37.00
Average method complexity4.60
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected