83% business-profile

Code Review | Five Star Business Profile and Schema

WordPress plugin Five Star Business Profile and Schema scored83%from 54 tests.

About plugin

  • Plugin page: business-profile
  • Plugin version: 2.3.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.4
  • WordPress version: 6.3.1
  • First release: Jul 15, 2014
  • Latest release: Nov 7, 2023
  • Number of updates: 116
  • Update frequency: every 29.3 days
  • Top authors: NateWr (55.17%)Rustaurius (45.69%)

Code review

54 tests

User reviews

50 reviews

Install metrics

10,000+ active /320,252 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: ▲1.63MB] [CPU: ▲13.99ms] Passed 4 tests

Analyzing server-side resources used by Five Star Business Profile and Schema
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.06 ▲1.5954.39 ▲13.72
Dashboard /wp-admin4.97 ▲1.6666.06 ▲20.41
Posts /wp-admin/edit.php5.02 ▲1.6663.72 ▲12.29
Add New Post /wp-admin/post-new.php7.57 ▲1.68110.17 ▲11.31
Media Library /wp-admin/upload.php4.83 ▲1.6051.97 ▲18.64
Dashboard /wp-admin/admin.php?page=bpfwp-dashboard4.8049.13
Schemas /wp-admin/edit.php?post_type=schema4.8748.55
Five Star Business Profile and Schema - Welcome! /wp-admin/index.php?page=bpfwp-getting-started4.8244.42
Settings /wp-admin/admin.php?page=bpfwp-settings4.8848.32
About Us /wp-admin/admin.php?page=bpfwp-about-us4.7956.21

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 412 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_bpfwp_contact_card_widget
widget_recent-posts
bpfwp-installation-time
can_compress_scripts
theysaidso_admin_options
bpfwp-permission-level
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Five Star Business Profile and Schema
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲8014.23 ▼0.121.71 ▼0.0643.63 ▼0.33
Dashboard /wp-admin2,241 ▲745.64 ▲0.0086.80 ▼18.3839.93 ▼4.05
Posts /wp-admin/edit.php2,146 ▲492.01 ▼0.0139.78 ▲0.6936.08 ▲0.77
Add New Post /wp-admin/post-new.php6,337 ▲4,80919.83 ▼3.37862.74 ▲150.5439.79 ▼25.13
Media Library /wp-admin/upload.php1,446 ▲434.25 ▲0.06100.35 ▼0.9243.55 ▼1.21
Dashboard /wp-admin/admin.php?page=bpfwp-dashboard1,1512.2129.0963.52
Schemas /wp-admin/edit.php?post_type=schema1,1642.1638.4537.13
Five Star Business Profile and Schema - Welcome! /wp-admin/index.php?page=bpfwp-getting-started1,9682.0434.9439.80
Settings /wp-admin/admin.php?page=bpfwp-settings2,89214.05328.5641.43
About Us /wp-admin/admin.php?page=bpfwp-about-us1,1322.2028.1933.96

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_bpfwp_contact_card_widget
    • theysaidso_admin_options
    • db_upgraded
    • bpfwp-installation-time
    • bpfwp-permission-level
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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
  • 45× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to get property 'settings' of non-object in wp-content/plugins/business-profile/bpfwp-templates/contact-card.php on line 100
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/business-profile/includes/patterns/whatsapp.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_15' not found in wp-content/plugins/business-profile/lib/simple-admin-pages/classes/AdminPageSetting.WarningTip.class.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_15' not found in wp-content/plugins/business-profile/lib/simple-admin-pages/classes/AdminPageSetting.FileUpload.class.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/business-profile/includes/patterns/fax.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_15' not found in wp-content/plugins/business-profile/lib/simple-admin-pages/classes/AdminPageSetting.Number.class.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_15' not found in wp-content/plugins/business-profile/lib/simple-admin-pages/classes/AdminPageSetting.Textarea.class.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_15' not found in wp-content/plugins/business-profile/lib/simple-admin-pages/classes/AdminPageSetting.Ordering.class.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/business-profile/includes/patterns/cell-phone.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function shortcode_exists() in wp-content/plugins/business-profile/includes/template-functions.php:148

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 32 tag instead of maximum 10
You can take inspiration from this readme.txt

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

The main file in "Five Star Business Profile and Schema" v. 2.3.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 180 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected25,398 lines of code in 374 files:
LanguageFilesBlank linesComment linesLines of code
PHP2714,92511,46814,853
CSS193222014,111
JavaScript726743843,160
PO File91,2232,0602,938
Markdown31260336

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity5.42
▷ Minimum class complexity1.00
▷ Maximum class complexity125.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes256
▷ Abstract classes20.78%
▷ Concrete classes25499.22%
▷ Final classes00.00%
Methods677
▷ Static methods40.59%
▷ Public methods65496.60%
▷ Protected methods71.03%
▷ Private methods162.36%
Functions36
▷ Named functions3391.67%
▷ Anonymous functions38.33%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

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
25 PNG files occupy 0.89MB with 0.54MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/bpfwp-icon.png208.16KB105.06KB▼ 49.53%
assets/img/premium-screenshots/labelling1.png27.34KB7.34KB▼ 73.14%
assets/img/ewd-support-icon-youtube.png1.75KB0.66KB▼ 62.56%
assets/img/premium-screenshots/premium.png64.47KB20.08KB▼ 68.85%
lib/simple-admin-pages/img/options-asset-lock.png1.05KB0.50KB▼ 52.28%