84% business-profile-extra-fields

Code Review | Business Profile Extra Fields

WordPress plugin Business Profile Extra Fields scored84%from 54 tests.

About plugin

  • Plugin page: business-profile-...
  • Plugin version: 1.2.9
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jul 15, 2022
  • Latest release: May 1, 2023
  • Number of updates: 32
  • Update frequency: every 9.1 days
  • Top authors: jseutens (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /604 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 gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼2.18ms] Passed 4 tests

An overview of server-side resources used by Business Profile Extra Fields
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1241.15 ▼0.32
Dashboard /wp-admin3.42 ▲0.1248.40 ▼3.17
Posts /wp-admin/edit.php3.53 ▲0.1850.79 ▲2.55
Add New Post /wp-admin/post-new.php6.00 ▲0.1289.02 ▼7.76
Media Library /wp-admin/upload.php3.34 ▲0.1140.04 ▲3.70

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Business Profile Extra Fields
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.24 ▼0.111.67 ▼0.2139.14 ▼4.33
Dashboard /wp-admin2,201 ▲245.57 ▼0.0386.96 ▼5.3644.16 ▲3.75
Posts /wp-admin/edit.php2,103 ▲31.94 ▼0.0538.20 ▼0.1142.72 ▲3.33
Add New Post /wp-admin/post-new.php1,532 ▼323.56 ▲5.38750.33 ▲101.7553.24 ▼12.25
Media Library /wp-admin/upload.php1,403 ▲64.20 ▲0.03103.65 ▼3.1143.17 ▲0.73

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_action() in wp-content/plugins/business-profile-extra-fields/includes/shared/weekdays.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Tags: There are too many tags (36 tag instead of maximum 10)
Please take inspiration from this readme.txt

business-profile-extra-fields/business-profile-extra-fields.php 92% from 13 tests

The primary PHP file in "Business Profile Extra Fields" version 1.2.9 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 217 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected2,593 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PO File73844601,198
PHP5891901,021
CSS33415374
HTML1100

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions47
▷ Named functions4391.49%
▷ Anonymous functions48.51%
Constants6
▷ Global constants6100.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
There were not PNG files found in your plugin